From 2d1981a80b9ce3073d55ee9706566e8e69529c4a Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Mon, 12 Sep 2005 11:18:10 +1000 Subject: [PATCH] --- yaml --- r: 8543 b: refs/heads/master c: f6515db47e6d8cb502e4b0fd7255652da4ba1393 h: refs/heads/master i: 8541: 4a8c8df07a68489caf4becacd883a42a7a21678f 8539: b80e30537d5f2b8cf0f1f78727a3a3a54e0498f3 8535: 23ba0e5071dca1a03f17517e0c914eb6044327e5 8527: 9fce484545a48a044627e13c791ab71c992f4b98 8511: d2fe88e71b1de6033a3ca26b36419cbd5bf1bddd v: v3 --- [refs] | 2 +- trunk/drivers/mtd/maps/uclinux.c | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index b151d3766bf7..d6223483ae22 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b0433b99339a9fdc2effe213491812556e4896fb +refs/heads/master: f6515db47e6d8cb502e4b0fd7255652da4ba1393 diff --git a/trunk/drivers/mtd/maps/uclinux.c b/trunk/drivers/mtd/maps/uclinux.c index 811d92e5f5b1..cc372136e852 100644 --- a/trunk/drivers/mtd/maps/uclinux.c +++ b/trunk/drivers/mtd/maps/uclinux.c @@ -23,9 +23,6 @@ #include #include -/****************************************************************************/ - - /****************************************************************************/ struct map_info uclinux_ram_map = { @@ -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; }