aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@snapgear.com>2005-09-12 11:18:10 +1000
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-11 20:43:46 -0700
commitf6515db47e6d8cb502e4b0fd7255652da4ba1393 (patch)
tree3cc5e0e31273c0c71b994dcea15d1c88efd6e6e5 /drivers/mtd/maps
parentb0433b99339a9fdc2effe213491812556e4896fb (diff)
downloadkernel_samsung_aries-f6515db47e6d8cb502e4b0fd7255652da4ba1393.zip
kernel_samsung_aries-f6515db47e6d8cb502e4b0fd7255652da4ba1393.tar.gz
kernel_samsung_aries-f6515db47e6d8cb502e4b0fd7255652da4ba1393.tar.bz2
[PATCH] uclinux: remove use of mtd_put_device() in uclinux MTD map driver
We should not call mtd_put_device() in the uclinux MTD map driver. Also consistently use phys/virt fields of maps map_info struct, instead of mixing it with map_priv_1. Signed-off-by: Greg Ungerer <gerg@uclinux.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/mtd/maps')
-rw-r--r--drivers/mtd/maps/uclinux.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c
index 811d92e..cc37213 100644
--- a/drivers/mtd/maps/uclinux.c
+++ b/drivers/mtd/maps/uclinux.c
@@ -25,9 +25,6 @@
/****************************************************************************/
-
-/****************************************************************************/
-
struct map_info uclinux_ram_map = {
.name = "RAM",
};
@@ -60,14 +57,15 @@ int __init uclinux_mtd_init(void)
struct mtd_info *mtd;
struct map_info *mapp;
extern char _ebss;
+ unsigned long addr = (unsigned long) &_ebss;
mapp = &uclinux_ram_map;
- mapp->phys = (unsigned long) &_ebss;
- mapp->size = PAGE_ALIGN(*((unsigned long *)((&_ebss) + 8)));
+ mapp->phys = addr;
+ mapp->size = PAGE_ALIGN(ntohl(*((unsigned long *)(addr + 8))));
mapp->bankwidth = 4;
printk("uclinux[mtd]: RAM probe address=0x%x size=0x%x\n",
- (int) mapp->map_priv_2, (int) mapp->size);
+ (int) mapp->phys, (int) mapp->size);
mapp->virt = ioremap_nocache(mapp->phys, mapp->size);
@@ -95,7 +93,6 @@ int __init uclinux_mtd_init(void)
printk("uclinux[mtd]: set %s to be root filesystem\n",
uclinux_romfs[0].name);
ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, 0);
- put_mtd_device(mtd);
return(0);
}
@@ -109,7 +106,7 @@ void __exit uclinux_mtd_cleanup(void)
map_destroy(uclinux_ram_mtdinfo);
uclinux_ram_mtdinfo = NULL;
}
- if (uclinux_ram_map.map_priv_1) {
+ if (uclinux_ram_map.virt) {
iounmap((void *) uclinux_ram_map.virt);
uclinux_ram_map.virt = 0;
}