aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/maps')
-rw-r--r--drivers/mtd/maps/bfin-async-flash.c2
-rw-r--r--drivers/mtd/maps/ixp2000.c11
-rw-r--r--drivers/mtd/maps/pxa2xx-flash.c2
3 files changed, 8 insertions, 7 deletions
diff --git a/drivers/mtd/maps/bfin-async-flash.c b/drivers/mtd/maps/bfin-async-flash.c
index d4297a97e100..67815eed2f00 100644
--- a/drivers/mtd/maps/bfin-async-flash.c
+++ b/drivers/mtd/maps/bfin-async-flash.c
@@ -142,7 +142,7 @@ static int __devinit bfin_flash_probe(struct platform_device *pdev)
142 state->map.write = bfin_flash_write; 142 state->map.write = bfin_flash_write;
143 state->map.copy_to = bfin_flash_copy_to; 143 state->map.copy_to = bfin_flash_copy_to;
144 state->map.bankwidth = pdata->width; 144 state->map.bankwidth = pdata->width;
145 state->map.size = memory->end - memory->start + 1; 145 state->map.size = resource_size(memory);
146 state->map.virt = (void __iomem *)memory->start; 146 state->map.virt = (void __iomem *)memory->start;
147 state->map.phys = memory->start; 147 state->map.phys = memory->start;
148 state->map.map_priv_1 = (unsigned long)state; 148 state->map.map_priv_1 = (unsigned long)state;
diff --git a/drivers/mtd/maps/ixp2000.c b/drivers/mtd/maps/ixp2000.c
index c00b9175ba9e..1594a802631d 100644
--- a/drivers/mtd/maps/ixp2000.c
+++ b/drivers/mtd/maps/ixp2000.c
@@ -155,7 +155,7 @@ static int ixp2000_flash_probe(struct platform_device *dev)
155 if (!plat) 155 if (!plat)
156 return -ENODEV; 156 return -ENODEV;
157 157
158 window_size = dev->resource->end - dev->resource->start + 1; 158 window_size = resource_size(dev->resource);
159 dev_info(&dev->dev, "Probe of IXP2000 flash(%d banks x %dMiB)\n", 159 dev_info(&dev->dev, "Probe of IXP2000 flash(%d banks x %dMiB)\n",
160 ixp_data->nr_banks, ((u32)window_size >> 20)); 160 ixp_data->nr_banks, ((u32)window_size >> 20));
161 161
@@ -194,16 +194,17 @@ static int ixp2000_flash_probe(struct platform_device *dev)
194 info->map.copy_to = ixp2000_flash_copy_to; 194 info->map.copy_to = ixp2000_flash_copy_to;
195 195
196 info->res = request_mem_region(dev->resource->start, 196 info->res = request_mem_region(dev->resource->start,
197 dev->resource->end - dev->resource->start + 1, 197 resource_size(dev->resource),
198 dev_name(&dev->dev)); 198 dev_name(&dev->dev));
199 if (!info->res) { 199 if (!info->res) {
200 dev_err(&dev->dev, "Could not reserve memory region\n"); 200 dev_err(&dev->dev, "Could not reserve memory region\n");
201 err = -ENOMEM; 201 err = -ENOMEM;
202 goto Error; 202 goto Error;
203 } 203 }
204 204
205 info->map.map_priv_1 = (unsigned long) ioremap(dev->resource->start, 205 info->map.map_priv_1 =
206 dev->resource->end - dev->resource->start + 1); 206 (unsigned long)ioremap(dev->resource->start,
207 resource_size(dev->resource));
207 if (!info->map.map_priv_1) { 208 if (!info->map.map_priv_1) {
208 dev_err(&dev->dev, "Failed to ioremap flash region\n"); 209 dev_err(&dev->dev, "Failed to ioremap flash region\n");
209 err = -EIO; 210 err = -EIO;
diff --git a/drivers/mtd/maps/pxa2xx-flash.c b/drivers/mtd/maps/pxa2xx-flash.c
index f59d62f74d44..7ae137d4b998 100644
--- a/drivers/mtd/maps/pxa2xx-flash.c
+++ b/drivers/mtd/maps/pxa2xx-flash.c
@@ -70,7 +70,7 @@ static int __devinit pxa2xx_flash_probe(struct platform_device *pdev)
70 info->map.name = (char *) flash->name; 70 info->map.name = (char *) flash->name;
71 info->map.bankwidth = flash->width; 71 info->map.bankwidth = flash->width;
72 info->map.phys = res->start; 72 info->map.phys = res->start;
73 info->map.size = res->end - res->start + 1; 73 info->map.size = resource_size(res);
74 info->parts = flash->parts; 74 info->parts = flash->parts;
75 info->nr_parts = flash->nr_parts; 75 info->nr_parts = flash->nr_parts;
76 76