mtd/drivers/mtd/maps sa1100-flash.c,1.44,1.45
Russell King
rmk at infradead.org
Thu Oct 21 08:28:53 EDT 2004
Update of /home/cvs/mtd/drivers/mtd/maps
In directory phoenix.infradead.org:/tmp/cvs-serv4505
Modified Files:
sa1100-flash.c
Log Message:
No point having sa1100_probe_map global; make it local
Index: sa1100-flash.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/sa1100-flash.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- sa1100-flash.c 21 Oct 2004 12:24:33 -0000 1.44
+++ sa1100-flash.c 21 Oct 2004 12:28:50 -0000 1.45
@@ -1077,13 +1077,9 @@
* - Is the MSC setup for flash (no -> failure)
* - Probe for flash
*/
-
-static struct map_info sa1100_probe_map __initdata = {
- .name = "SA1100-flash",
-};
-
static void __init sa1100_probe_one_cs(unsigned int msc, unsigned long phys)
{
+ struct map_info map;
struct mtd_info *mtd;
printk(KERN_INFO "* Probing 0x%08lx: MSC = 0x%04x %d bit ",
@@ -1099,19 +1095,23 @@
return;
}
- sa1100_probe_map.bankwidth = msc & MSC_RBW ? 2 : 4;
- sa1100_probe_map.size = SZ_1M;
- sa1100_probe_map.phys = phys;
- sa1100_probe_map.virt = (void __iomem *)ioremap(phys, SZ_1M);
- if (sa1100_probe_map.virt == 0)
+ memset(&map, 0, sizeof(struct map_info));
+
+ map.name = "Probe";
+ map.bankwidth = msc & MSC_RBW ? 2 : 4;
+ map.size = SZ_1M;
+ map.phys = phys;
+ map.virt = ioremap(phys, SZ_1M);
+ if (map.virt == NULL)
goto fail;
- simple_map_init(&sa1100_probe_map);
+
+ simple_map_init(&map);
/* Shame cfi_probe blurts out kernel messages... */
- mtd = do_map_probe("cfi_probe", &sa1100_probe_map);
+ mtd = do_map_probe("cfi_probe", &map);
if (mtd)
map_destroy(mtd);
- iounmap((void *)sa1100_probe_map.virt);
+ iounmap(map.virt);
if (!mtd)
goto fail;
More information about the linux-mtd-cvs
mailing list