mtd/drivers/mtd/maps sa1100-flash.c,1.42,1.43
Russell King
rmk at infradead.org
Thu Oct 21 08:20:58 EDT 2004
Update of /home/cvs/mtd/drivers/mtd/maps
In directory phoenix.infradead.org:/tmp/cvs-serv4375
Modified Files:
sa1100-flash.c
Log Message:
No need to keep a separate copy of the ioremap cookie
Index: sa1100-flash.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/sa1100-flash.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- sa1100-flash.c 21 Oct 2004 12:15:35 -0000 1.42
+++ sa1100-flash.c 21 Oct 2004 12:20:55 -0000 1.43
@@ -917,7 +917,6 @@
unsigned long base;
unsigned long size;
int width;
- void *vbase;
void (*set_vpp)(struct map_info *, int);
struct map_info *map;
struct mtd_info *mtd;
@@ -958,13 +957,12 @@
sa[i].map = maps + i;
- sa[i].vbase = ioremap(sa[i].base, sa[i].size);
- if (!sa[i].vbase) {
+ sa[i].map->virt = ioremap(sa[i].base, sa[i].size);
+ if (!sa[i].map->virt) {
ret = -ENOMEM;
break;
}
- sa[i].map->virt = (void __iomem *)sa[i].vbase;
sa[i].map->phys = sa[i].base;
sa[i].map->set_vpp = sa[i].set_vpp;
sa[i].map->bankwidth = sa[i].width;
@@ -996,8 +994,8 @@
* resource and mark it as such.
*/
if (ret == -ENXIO) {
- iounmap(sa[i].vbase);
- sa[i].vbase = NULL;
+ iounmap(sa[i].map->virt);
+ sa[i].map->virt = NULL;
release_resource(sa[i].res);
sa[i].res = NULL;
}
@@ -1036,8 +1034,8 @@
do {
if (sa[i].mtd)
map_destroy(sa[i].mtd);
- if (sa[i].vbase)
- iounmap(sa[i].vbase);
+ if (sa[i].map->virt)
+ iounmap(sa[i].map->virt);
if (sa[i].res)
release_resource(sa[i].res);
} while (i--);
@@ -1062,8 +1060,8 @@
for (i = NR_SUBMTD; i >= 0; i--) {
if (sa[i].mtd)
map_destroy(sa[i].mtd);
- if (sa[i].vbase)
- iounmap(sa[i].vbase);
+ if (sa[i].map->virt)
+ iounmap(sa[i].map->virt);
if (sa[i].res)
release_resource(sa[i].res);
}
More information about the linux-mtd-cvs
mailing list