diff options
author | Amol Lad <amol@verismonetworks.com> | 2006-10-02 09:48:23 +0100 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-10-02 09:48:23 +0100 |
commit | 76a5027c374a638e55de5d8c4485ea0201254870 (patch) | |
tree | 250f1d0c3572077dc06a47cdc4ce5941e171b67f | |
parent | 553a8012088b3452c7d66ff60d2d06ad0c9bea00 (diff) | |
download | talos-op-linux-76a5027c374a638e55de5d8c4485ea0201254870.tar.gz talos-op-linux-76a5027c374a638e55de5d8c4485ea0201254870.zip |
[MTD] Cleanup of 'ioremap balanced with iounmap for drivers/mtd subsystem'
Updated version of patch, in response to comments from Francois Romieu
<romieu@fr.zoreil.com>
Remove gratuitous casts from iounmap and initialisation of variables.
Signed-off-by: Amol Lad <amol@verismonetworks.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
-rw-r--r-- | drivers/mtd/maps/arctic-mtd.c | 6 | ||||
-rw-r--r-- | drivers/mtd/maps/beech-mtd.c | 6 | ||||
-rw-r--r-- | drivers/mtd/maps/cstm_mips_ixx.c | 8 | ||||
-rw-r--r-- | drivers/mtd/maps/nettel.c | 2 | ||||
-rw-r--r-- | drivers/mtd/maps/redwood.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/edb7312.c | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/drivers/mtd/maps/arctic-mtd.c b/drivers/mtd/maps/arctic-mtd.c index 642d96bc8919..2cc902436275 100644 --- a/drivers/mtd/maps/arctic-mtd.c +++ b/drivers/mtd/maps/arctic-mtd.c @@ -96,7 +96,7 @@ static struct mtd_partition arctic_partitions[PARTITIONS] = { static int __init init_arctic_mtd(void) { - int err = 0; + int err; printk("%s: 0x%08x at 0x%08x\n", NAME, SIZE, PADDR); @@ -112,7 +112,7 @@ init_arctic_mtd(void) arctic_mtd = do_map_probe("cfi_probe", &arctic_mtd_map); if (!arctic_mtd) { - iounmap((void *) arctic_mtd_map.virt); + iounmap(arctic_mtd_map.virt); return -ENXIO; } @@ -121,7 +121,7 @@ init_arctic_mtd(void) err = add_mtd_partitions(arctic_mtd, arctic_partitions, PARTITIONS); if (err) { printk("%s: add_mtd_partitions failed\n", NAME); - iounmap((void *) arctic_mtd_map.virt); + iounmap(arctic_mtd_map.virt); } return err; diff --git a/drivers/mtd/maps/beech-mtd.c b/drivers/mtd/maps/beech-mtd.c index a64b1a5ab316..d76d5981b863 100644 --- a/drivers/mtd/maps/beech-mtd.c +++ b/drivers/mtd/maps/beech-mtd.c @@ -72,7 +72,7 @@ static struct mtd_partition beech_partitions[2] = { static int __init init_beech_mtd(void) { - int err = 0; + int err; printk("%s: 0x%08x at 0x%08x\n", NAME, SIZE, PADDR); @@ -89,7 +89,7 @@ init_beech_mtd(void) beech_mtd = do_map_probe("cfi_probe", &beech_mtd_map); if (!beech_mtd) { - iounmap((void *) beech_mtd_map.virt); + iounmap(beech_mtd_map.virt); return -ENXIO; } @@ -98,7 +98,7 @@ init_beech_mtd(void) err = add_mtd_partitions(beech_mtd, beech_partitions, 2); if (err) { printk("%s: add_mtd_partitions failed\n", NAME); - iounmap((void *) beech_mtd_map.virt); + iounmap(beech_mtd_map.virt); } return err; diff --git a/drivers/mtd/maps/cstm_mips_ixx.c b/drivers/mtd/maps/cstm_mips_ixx.c index d6bef100d69a..df2c38ef105a 100644 --- a/drivers/mtd/maps/cstm_mips_ixx.c +++ b/drivers/mtd/maps/cstm_mips_ixx.c @@ -175,8 +175,8 @@ int __init init_cstm_mips_ixx(void) printk(KERN_WARNING "Failed to ioremap\n"); for (j = 0; j < i; j++) { if (cstm_mips_ixx_map[j].virt) { - iounmap((void *)cstm_mips_ixx_map[j].virt); - cstm_mips_ixx_map[j].virt = 0; + iounmap(cstm_mips_ixx_map[j].virt); + cstm_mips_ixx_map[j].virt = NULL; } } return -EIO; @@ -214,8 +214,8 @@ int __init init_cstm_mips_ixx(void) else { for (i = 0; i < PHYSMAP_NUMBER; i++) { if (cstm_mips_ixx_map[i].virt) { - iounmap((void *)cstm_mips_ixx_map[i].virt); - cstm_mips_ixx_map[i].virt = 0; + iounmap(cstm_mips_ixx_map[i].virt); + cstm_mips_ixx_map[i].virt = NULL; } } return -ENXIO; diff --git a/drivers/mtd/maps/nettel.c b/drivers/mtd/maps/nettel.c index 198e840ff6db..f9e8e5bcbc33 100644 --- a/drivers/mtd/maps/nettel.c +++ b/drivers/mtd/maps/nettel.c @@ -463,7 +463,7 @@ int __init nettel_init(void) #ifdef CONFIG_MTD_CFI_INTELEXT out_unmap1: - iounmap((void *) nettel_intel_map.virt); + iounmap(nettel_intel_map.virt); #endif out_unmap2: diff --git a/drivers/mtd/maps/redwood.c b/drivers/mtd/maps/redwood.c index 2257d2b500c0..4d858b3d5f82 100644 --- a/drivers/mtd/maps/redwood.c +++ b/drivers/mtd/maps/redwood.c @@ -126,7 +126,7 @@ static struct mtd_info *redwood_mtd; int __init init_redwood_flash(void) { - int err = 0; + int err; printk(KERN_NOTICE "redwood: flash mapping: %x at %x\n", WINDOW_SIZE, WINDOW_ADDR); diff --git a/drivers/mtd/nand/edb7312.c b/drivers/mtd/nand/edb7312.c index 12017f3c6bd6..1daf8231aaef 100644 --- a/drivers/mtd/nand/edb7312.c +++ b/drivers/mtd/nand/edb7312.c @@ -199,7 +199,7 @@ static void __exit ep7312_cleanup(void) nand_release(ap7312_mtd); /* Release io resource */ - iounmap((void *)this->IO_ADDR_R); + iounmap(this->IO_ADDR_R); /* Free the MTD device structure */ kfree(ep7312_mtd); |