fix flash driver fixes, call request_mem_region/ioremap_nocache with the correct...
authorGabor Juhos <juhosg@openwrt.org>
Sun, 4 Nov 2007 12:58:52 +0000 (12:58 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Sun, 4 Nov 2007 12:58:52 +0000 (12:58 +0000)
SVN-Revision: 9496

target/linux/adm5120/files/drivers/mtd/maps/adm5120-flash.c

index 20f67d625f4a8f1907b005b063a00c32adaaf83c..824d2f5e8e7fc41c2ea1a4fb70cde5d6c6db9235 100644 (file)
@@ -220,14 +220,15 @@ static int adm5120_flash_initres(struct adm5120_flash_info *info)
        struct map_info *map = &info->amap.map;
        int err = 0;
 
-       info->res = request_mem_region(map->phys, map->size, map->name);
+       info->res = request_mem_region(map->phys, info->amap.window_size,
+                       map->name);
        if (info->res == NULL) {
                MAP_ERR(map, "could not reserve memory region\n");
                err = -ENOMEM;
                goto out;
        }
 
-       map->virt = ioremap_nocache(map->phys, map->size);
+       map->virt = ioremap_nocache(map->phys, info->amap.window_size);
        if (map->virt == NULL) {
                MAP_ERR(map, "failed to ioremap flash region\n");
                err = -ENOMEM;