static char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL };
u8 byte;
struct amd76xrom_window *window = &amd76xrom_window;
- struct amd76xrom_map_info *map = 0;
+ struct amd76xrom_map_info *map = NULL;
unsigned long map_top;
/* Remember the pci dev I find the window in */
map->mtd->owner = THIS_MODULE;
if (add_mtd_device(map->mtd)) {
map_destroy(map->mtd);
- map->mtd = 0;
+ map->mtd = NULL;
goto out;
}
/* File away the map structure */
list_add(&map->list, &window->maps);
- map = 0;
+ map = NULL;
}
out:
mymtd->erasesize = 0x10000;
if (!mymtd) {
- iounmap((void *)dnpc_map.virt);
+ iounmap(dnpc_map.virt);
return -ENXIO;
}
map_destroy(mymtd);
}
if (dnpc_map.virt) {
- iounmap((void *)dnpc_map.virt);
+ iounmap(dnpc_map.virt);
dnpc_unmap_flash();
- dnpc_map.virt = 0;
+ dnpc_map.virt = NULL;
}
}
int __init init_ebony(void)
{
u8 fpga0_reg;
- u8 *fpga0_adr;
+ u8 __iomem *fpga0_adr;
unsigned long long small_flash_base, large_flash_base;
fpga0_adr = ioremap64(EBONY_FPGA_ADDR, 16);
}
ebony_large_map.phys = large_flash_base;
- ebony_large_map.virt =
- (unsigned long)ioremap64(large_flash_base,
+ ebony_large_map.virt = ioremap64(large_flash_base,
ebony_large_map.size);
if (!ebony_large_map.virt) {
}
if (ebony_small_map.virt) {
- iounmap((void *)ebony_small_map.virt);
- ebony_small_map.virt = 0;
+ iounmap(ebony_small_map.virt);
+ ebony_small_map.virt = NULL;
}
if (ebony_large_map.virt) {
- iounmap((void *)ebony_large_map.virt);
- ebony_large_map.virt = 0;
+ iounmap(ebony_large_map.virt);
+ ebony_large_map.virt = NULL;
}
}
map_destroy( all_mtd );
}
- iounmap((void *)iomapadr);
+ iounmap(iomapadr);
}
static int __init init_elan_104nc(void)
{
static char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL };
struct ichxrom_window *window = &ichxrom_window;
- struct ichxrom_map_info *map = 0;
+ struct ichxrom_map_info *map = NULL;
unsigned long map_top;
u8 byte;
u16 word;
map->mtd->owner = THIS_MODULE;
if (add_mtd_device(map->mtd)) {
map_destroy(map->mtd);
- map->mtd = 0;
+ map->mtd = NULL;
goto out;
}
/* File away the map structure */
list_add(&map->list, &window->maps);
- map = 0;
+ map = NULL;
}
out:
/* Allocate the resource region */
if (pci_assign_resource(pm_dev, PIIXE_IOBASE_RESOURCE) != 0) {
printk(KERN_WARNING "Could not allocate pm iobase resource\n");
- iounmap((void *)l440gx_map.virt);
+ iounmap(l440gx_map.virt);
return -ENXIO;
}
}
return 0;
}
- iounmap((void *)l440gx_map.virt);
+ iounmap(l440gx_map.virt);
return -ENXIO;
}
del_mtd_device(mymtd);
map_destroy(mymtd);
- iounmap((void *)l440gx_map.virt);
+ iounmap(l440gx_map.virt);
}
module_init(init_l440gx);
mymtd = do_map_probe("map_rom", &netsc520_map);
if (!mymtd) {
- iounmap((void *)netsc520_map.virt);
+ iounmap(netsc520_map.virt);
return -ENXIO;
}
map_destroy(mymtd);
}
if (netsc520_map.virt) {
- iounmap((void *)netsc520_map.virt);
- netsc520_map.virt = 0;
+ iounmap(netsc520_map.virt);
+ netsc520_map.virt = NULL;
}
}
map_destroy(amd_mtd);
}
if (nettel_amd_map.virt) {
- iounmap((void *)nettel_amd_map.virt);
- nettel_amd_map.virt = 0;
+ iounmap(nettel_amd_map.virt);
+ nettel_amd_map.virt = NULL;
}
#ifdef CONFIG_MTD_CFI_INTELEXT
if (intel_mtd) {
struct map_pci_info {
struct map_info map;
- void *base;
+ void __iomem *base;
void (*exit)(struct pci_dev *dev, struct map_pci_info *map);
unsigned long (*translate)(struct map_pci_info *map, unsigned long ofs);
struct pci_dev *dev;
intel_iq80310_exit(struct pci_dev *dev, struct map_pci_info *map)
{
if (map->base)
- iounmap((void *)map->base);
+ iounmap(map->base);
pci_write_config_dword(dev, 0x44, map->map.map_priv_2);
}
u32 val;
if (map->base)
- iounmap((void *)map->base);
+ iounmap(map->base);
/*
* We need to undo the PCI BAR2/PCI ROM BAR address alteration.
return 0;
}
- iounmap((void *)physmap_map.virt);
+ iounmap(physmap_map.virt);
return -ENXIO;
}
#endif
map_destroy(mymtd);
- iounmap((void *)physmap_map.virt);
- physmap_map.virt = 0;
+ iounmap(physmap_map.virt);
+ physmap_map.virt = NULL;
}
module_init(init_physmap);
map_destroy( all_mtd );
}
- iounmap((void *)iomapadr);
+ iounmap(iomapadr);
release_region(PAGE_IO,PAGE_IO_SIZE);
}
printk( KERN_ERR"%s: IO ports 0x%x-0x%x in use\n",
sbc_gxx_map.name,
PAGE_IO, PAGE_IO+PAGE_IO_SIZE-1 );
- iounmap((void *)iomapadr);
+ iounmap(iomapadr);
return -EAGAIN;
}
static void sc520cdp_setup_par(void)
{
- volatile unsigned long *mmcr;
+ volatile unsigned long __iomem *mmcr;
unsigned long mmcr_val;
int i, j;
/* map in SC520's MMCR area */
- mmcr = (unsigned long *)ioremap_nocache(SC520_MMCR_BASE, SC520_MMCR_EXTENT);
+ mmcr = ioremap_nocache(SC520_MMCR_BASE, SC520_MMCR_EXTENT);
if(!mmcr) { /* ioremap_nocache failed: skip the PAR reprogramming */
/* force physical address fields to BIOS defaults: */
for(i = 0; i < NUM_FLASH_BANKS; i++)
sc520cdp_map[i].phys = par_table[i].default_address;
}
}
- iounmap((void *)mmcr);
+ iounmap(mmcr);
}
#endif
++devices_found;
}
else {
- iounmap((void *)sc520cdp_map[i].virt);
+ iounmap(sc520cdp_map[i].virt);
}
}
if(devices_found >= 2) {
if (mymtd[i])
map_destroy(mymtd[i]);
if (sc520cdp_map[i].virt) {
- iounmap((void *)sc520cdp_map[i].virt);
- sc520cdp_map[i].virt = 0;
+ iounmap(sc520cdp_map[i].virt);
+ sc520cdp_map[i].virt = NULL;
}
}
}
#define SCB2_WINDOW 0x00100000
-static void *scb2_ioaddr;
+static void __iomem *scb2_ioaddr;
static struct mtd_info *scb2_mtd;
static struct map_info scb2_map = {
.name = "SCB2 BIOS Flash",
}
scb2_map.phys = SCB2_ADDR;
- scb2_map.virt = (void __iomem *)scb2_ioaddr;
+ scb2_map.virt = scb2_ioaddr;
scb2_map.size = SCB2_WINDOW;
simple_map_init(&scb2_map);
mymtd = do_map_probe(flashtype, &scx200_docflash_map);
if (!mymtd) {
printk(KERN_ERR NAME ": unable to detect flash\n");
- iounmap((void *)scx200_docflash_map.virt);
+ iounmap(scx200_docflash_map.virt);
release_resource(&docmem);
return -ENXIO;
}
map_destroy(mymtd);
}
if (scx200_docflash_map.virt) {
- iounmap((void *)scx200_docflash_map.virt);
+ iounmap(scx200_docflash_map.virt);
release_resource(&docmem);
}
}
{
int rc = 0;
- ts5500_map.virt = (void*)ioremap_nocache(ts5500_map.phys, ts5500_map.size);
+ ts5500_map.virt = ioremap_nocache(ts5500_map.phys, ts5500_map.size);
if(!ts5500_map.virt) {
printk(KERN_ERR "Failed to ioremap_nocache\n");
err_out_map:
map_destroy(mymtd);
err_out_ioremap:
- iounmap((void *)ts5500_map.virt);
+ iounmap(ts5500_map.virt);
return rc;
}
}
if (ts5500_map.virt) {
- iounmap((void *)ts5500_map.virt);
- ts5500_map.virt = 0;
+ iounmap(ts5500_map.virt);
+ ts5500_map.virt = NULL;
}
}