mtd/drivers/mtd/maps mainstone-flash.c,1.1,1.2
tpoynor at infradead.org
tpoynor at infradead.org
Fri Jul 1 18:55:24 EDT 2005
Update of /home/cvs/mtd/drivers/mtd/maps
In directory phoenix.infradead.org:/tmp/cvs-serv20373/drivers/mtd/maps
Modified Files:
mainstone-flash.c
Log Message:
Mostly formatting fixups to PXA27x Mainstone mtd map driver suggested by
Jorn Engel.
Index: mainstone-flash.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/mainstone-flash.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mainstone-flash.c 30 Jun 2005 22:41:36 -0000 1.1
+++ mainstone-flash.c 1 Jul 2005 22:55:20 -0000 1.2
@@ -30,7 +30,8 @@
#define WINDOW_SIZE 0x04000000
-static void mainstone_map_inval_cache(struct map_info *map, unsigned long from, ssize_t len)
+static void mainstone_map_inval_cache(struct map_info *map, unsigned long from,
+ ssize_t len)
{
consistent_sync((char *)map->cached + from, len, DMA_FROM_DEVICE);
}
@@ -84,19 +85,25 @@
mainstone_maps[0].name);
for (i = 0; i < 2; i++) {
- mainstone_maps[i].virt = ioremap(mainstone_maps[i].phys, WINDOW_SIZE);
+ mainstone_maps[i].virt = ioremap(mainstone_maps[i].phys,
+ WINDOW_SIZE);
if (!mainstone_maps[i].virt) {
- printk(KERN_WARNING "Failed to ioremap %s\n", mainstone_maps[i].name);
+ printk(KERN_WARNING "Failed to ioremap %s\n",
+ mainstone_maps[i].name);
if (!ret)
ret = -ENOMEM;
continue;
}
- mainstone_maps[i].cached = ioremap_cached(mainstone_maps[i].phys, WINDOW_SIZE);
+ mainstone_maps[i].cached =
+ ioremap_cached(mainstone_maps[i].phys, WINDOW_SIZE);
if (!mainstone_maps[i].cached)
- printk(KERN_WARNING "Failed to ioremap cached %s\n", mainstone_maps[i].name);
+ printk(KERN_WARNING "Failed to ioremap cached %s\n",
+ mainstone_maps[i].name);
simple_map_init(&mainstone_maps[i]);
- printk(KERN_NOTICE "Probing %s at physical address 0x%08lx (%d-bit bankwidth)\n",
+ printk(KERN_NOTICE
+ "Probing %s at physical address 0x%08lx"
+ " (%d-bit bankwidth)\n",
mainstone_maps[i].name, mainstone_maps[i].phys,
mainstone_maps[i].bankwidth * 8);
@@ -124,14 +131,19 @@
for (i = 0; i < 2; i++) {
if (!mymtds[i]) {
- printk(KERN_WARNING "%s is absent. Skipping\n", mainstone_maps[i].name);
+ printk(KERN_WARNING "%s is absent. Skipping\n",
+ mainstone_maps[i].name);
} else if (nr_parsed_parts[i]) {
- add_mtd_partitions(mymtds[i], parsed_parts[i], nr_parsed_parts[i]);
+ add_mtd_partitions(mymtds[i], parsed_parts[i],
+ nr_parsed_parts[i]);
} else if (!i) {
- printk("Using static partitions on %s\n", mainstone_maps[i].name);
- add_mtd_partitions(mymtds[i], mainstone_partitions, ARRAY_SIZE(mainstone_partitions));
+ printk("Using static partitions on %s\n",
+ mainstone_maps[i].name);
+ add_mtd_partitions(mymtds[i], mainstone_partitions,
+ ARRAY_SIZE(mainstone_partitions));
} else {
- printk("Registering %s as whole device\n", mainstone_maps[i].name);
+ printk("Registering %s as whole device\n",
+ mainstone_maps[i].name);
add_mtd_device(mymtds[i]);
}
}
@@ -148,15 +160,13 @@
if (nr_parsed_parts[i] || !i)
del_mtd_partitions(mymtds[i]);
else
- del_mtd_device(mymtds[i]);
+ del_mtd_device(mymtds[i]);
map_destroy(mymtds[i]);
iounmap((void *)mainstone_maps[i].virt);
if (mainstone_maps[i].cached)
iounmap(mainstone_maps[i].cached);
-
- if (parsed_parts[i])
- kfree(parsed_parts[i]);
+ kfree(parsed_parts[i]);
}
}
More information about the linux-mtd-cvs
mailing list