diff options
Diffstat (limited to 'drivers/mtd/maps/ixp4xx.c')
-rw-r--r-- | drivers/mtd/maps/ixp4xx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c index 7214b876feba..7b0515297411 100644 --- a/drivers/mtd/maps/ixp4xx.c +++ b/drivers/mtd/maps/ixp4xx.c | |||
@@ -210,7 +210,7 @@ static int ixp4xx_flash_probe(struct platform_device *dev) | |||
210 | * not attempt to do a direct access on us. | 210 | * not attempt to do a direct access on us. |
211 | */ | 211 | */ |
212 | info->map.phys = NO_XIP; | 212 | info->map.phys = NO_XIP; |
213 | info->map.size = dev->resource->end - dev->resource->start + 1; | 213 | info->map.size = resource_size(dev->resource); |
214 | 214 | ||
215 | /* | 215 | /* |
216 | * We only support 16-bit accesses for now. If and when | 216 | * We only support 16-bit accesses for now. If and when |
@@ -224,7 +224,7 @@ static int ixp4xx_flash_probe(struct platform_device *dev) | |||
224 | info->map.copy_from = ixp4xx_copy_from, | 224 | info->map.copy_from = ixp4xx_copy_from, |
225 | 225 | ||
226 | info->res = request_mem_region(dev->resource->start, | 226 | info->res = request_mem_region(dev->resource->start, |
227 | dev->resource->end - dev->resource->start + 1, | 227 | resource_size(dev->resource), |
228 | "IXP4XXFlash"); | 228 | "IXP4XXFlash"); |
229 | if (!info->res) { | 229 | if (!info->res) { |
230 | printk(KERN_ERR "IXP4XXFlash: Could not reserve memory region\n"); | 230 | printk(KERN_ERR "IXP4XXFlash: Could not reserve memory region\n"); |
@@ -233,7 +233,7 @@ static int ixp4xx_flash_probe(struct platform_device *dev) | |||
233 | } | 233 | } |
234 | 234 | ||
235 | info->map.virt = ioremap(dev->resource->start, | 235 | info->map.virt = ioremap(dev->resource->start, |
236 | dev->resource->end - dev->resource->start + 1); | 236 | resource_size(dev->resource)); |
237 | if (!info->map.virt) { | 237 | if (!info->map.virt) { |
238 | printk(KERN_ERR "IXP4XXFlash: Failed to ioremap region\n"); | 238 | printk(KERN_ERR "IXP4XXFlash: Failed to ioremap region\n"); |
239 | err = -EIO; | 239 | err = -EIO; |