aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAmol Lad <amol@verismonetworks.com>2006-10-02 04:48:23 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-10-02 04:48:23 -0400
commit76a5027c374a638e55de5d8c4485ea0201254870 (patch)
tree250f1d0c3572077dc06a47cdc4ce5941e171b67f /drivers
parent553a8012088b3452c7d66ff60d2d06ad0c9bea00 (diff)
[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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/maps/arctic-mtd.c6
-rw-r--r--drivers/mtd/maps/beech-mtd.c6
-rw-r--r--drivers/mtd/maps/cstm_mips_ixx.c8
-rw-r--r--drivers/mtd/maps/nettel.c2
-rw-r--r--drivers/mtd/maps/redwood.c2
-rw-r--r--drivers/mtd/nand/edb7312.c2
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] = {
96static int __init 96static int __init
97init_arctic_mtd(void) 97init_arctic_mtd(void)
98{ 98{
99 int err = 0; 99 int err;
100 100
101 printk("%s: 0x%08x at 0x%08x\n", NAME, SIZE, PADDR); 101 printk("%s: 0x%08x at 0x%08x\n", NAME, SIZE, PADDR);
102 102
@@ -112,7 +112,7 @@ init_arctic_mtd(void)
112 arctic_mtd = do_map_probe("cfi_probe", &arctic_mtd_map); 112 arctic_mtd = do_map_probe("cfi_probe", &arctic_mtd_map);
113 113
114 if (!arctic_mtd) { 114 if (!arctic_mtd) {
115 iounmap((void *) arctic_mtd_map.virt); 115 iounmap(arctic_mtd_map.virt);
116 return -ENXIO; 116 return -ENXIO;
117 } 117 }
118 118
@@ -121,7 +121,7 @@ init_arctic_mtd(void)
121 err = add_mtd_partitions(arctic_mtd, arctic_partitions, PARTITIONS); 121 err = add_mtd_partitions(arctic_mtd, arctic_partitions, PARTITIONS);
122 if (err) { 122 if (err) {
123 printk("%s: add_mtd_partitions failed\n", NAME); 123 printk("%s: add_mtd_partitions failed\n", NAME);
124 iounmap((void *) arctic_mtd_map.virt); 124 iounmap(arctic_mtd_map.virt);
125 } 125 }
126 126
127 return err; 127 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] = {
72static int __init 72static int __init
73init_beech_mtd(void) 73init_beech_mtd(void)
74{ 74{
75 int err = 0; 75 int err;
76 76
77 printk("%s: 0x%08x at 0x%08x\n", NAME, SIZE, PADDR); 77 printk("%s: 0x%08x at 0x%08x\n", NAME, SIZE, PADDR);
78 78
@@ -89,7 +89,7 @@ init_beech_mtd(void)
89 beech_mtd = do_map_probe("cfi_probe", &beech_mtd_map); 89 beech_mtd = do_map_probe("cfi_probe", &beech_mtd_map);
90 90
91 if (!beech_mtd) { 91 if (!beech_mtd) {
92 iounmap((void *) beech_mtd_map.virt); 92 iounmap(beech_mtd_map.virt);
93 return -ENXIO; 93 return -ENXIO;
94 } 94 }
95 95
@@ -98,7 +98,7 @@ init_beech_mtd(void)
98 err = add_mtd_partitions(beech_mtd, beech_partitions, 2); 98 err = add_mtd_partitions(beech_mtd, beech_partitions, 2);
99 if (err) { 99 if (err) {
100 printk("%s: add_mtd_partitions failed\n", NAME); 100 printk("%s: add_mtd_partitions failed\n", NAME);
101 iounmap((void *) beech_mtd_map.virt); 101 iounmap(beech_mtd_map.virt);
102 } 102 }
103 103
104 return err; 104 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)
175 printk(KERN_WARNING "Failed to ioremap\n"); 175 printk(KERN_WARNING "Failed to ioremap\n");
176 for (j = 0; j < i; j++) { 176 for (j = 0; j < i; j++) {
177 if (cstm_mips_ixx_map[j].virt) { 177 if (cstm_mips_ixx_map[j].virt) {
178 iounmap((void *)cstm_mips_ixx_map[j].virt); 178 iounmap(cstm_mips_ixx_map[j].virt);
179 cstm_mips_ixx_map[j].virt = 0; 179 cstm_mips_ixx_map[j].virt = NULL;
180 } 180 }
181 } 181 }
182 return -EIO; 182 return -EIO;
@@ -214,8 +214,8 @@ int __init init_cstm_mips_ixx(void)
214 else { 214 else {
215 for (i = 0; i < PHYSMAP_NUMBER; i++) { 215 for (i = 0; i < PHYSMAP_NUMBER; i++) {
216 if (cstm_mips_ixx_map[i].virt) { 216 if (cstm_mips_ixx_map[i].virt) {
217 iounmap((void *)cstm_mips_ixx_map[i].virt); 217 iounmap(cstm_mips_ixx_map[i].virt);
218 cstm_mips_ixx_map[i].virt = 0; 218 cstm_mips_ixx_map[i].virt = NULL;
219 } 219 }
220 } 220 }
221 return -ENXIO; 221 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)
463 463
464#ifdef CONFIG_MTD_CFI_INTELEXT 464#ifdef CONFIG_MTD_CFI_INTELEXT
465out_unmap1: 465out_unmap1:
466 iounmap((void *) nettel_intel_map.virt); 466 iounmap(nettel_intel_map.virt);
467#endif 467#endif
468 468
469out_unmap2: 469out_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;
126 126
127int __init init_redwood_flash(void) 127int __init init_redwood_flash(void)
128{ 128{
129 int err = 0; 129 int err;
130 130
131 printk(KERN_NOTICE "redwood: flash mapping: %x at %x\n", 131 printk(KERN_NOTICE "redwood: flash mapping: %x at %x\n",
132 WINDOW_SIZE, WINDOW_ADDR); 132 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)
199 nand_release(ap7312_mtd); 199 nand_release(ap7312_mtd);
200 200
201 /* Release io resource */ 201 /* Release io resource */
202 iounmap((void *)this->IO_ADDR_R); 202 iounmap(this->IO_ADDR_R);
203 203
204 /* Free the MTD device structure */ 204 /* Free the MTD device structure */
205 kfree(ep7312_mtd); 205 kfree(ep7312_mtd);