diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-pmcmsp.c')
-rw-r--r-- | drivers/i2c/busses/i2c-pmcmsp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-pmcmsp.c b/drivers/i2c/busses/i2c-pmcmsp.c index 0bdb2d7f0570..7b57d5f267e1 100644 --- a/drivers/i2c/busses/i2c-pmcmsp.c +++ b/drivers/i2c/busses/i2c-pmcmsp.c | |||
@@ -283,7 +283,7 @@ static int __devinit pmcmsptwi_probe(struct platform_device *pldev) | |||
283 | } | 283 | } |
284 | 284 | ||
285 | /* reserve the memory region */ | 285 | /* reserve the memory region */ |
286 | if (!request_mem_region(res->start, res->end - res->start + 1, | 286 | if (!request_mem_region(res->start, resource_size(res), |
287 | pldev->name)) { | 287 | pldev->name)) { |
288 | dev_err(&pldev->dev, | 288 | dev_err(&pldev->dev, |
289 | "Unable to get memory/io address region 0x%08x\n", | 289 | "Unable to get memory/io address region 0x%08x\n", |
@@ -294,7 +294,7 @@ static int __devinit pmcmsptwi_probe(struct platform_device *pldev) | |||
294 | 294 | ||
295 | /* remap the memory */ | 295 | /* remap the memory */ |
296 | pmcmsptwi_data.iobase = ioremap_nocache(res->start, | 296 | pmcmsptwi_data.iobase = ioremap_nocache(res->start, |
297 | res->end - res->start + 1); | 297 | resource_size(res)); |
298 | if (!pmcmsptwi_data.iobase) { | 298 | if (!pmcmsptwi_data.iobase) { |
299 | dev_err(&pldev->dev, | 299 | dev_err(&pldev->dev, |
300 | "Unable to ioremap address 0x%08x\n", res->start); | 300 | "Unable to ioremap address 0x%08x\n", res->start); |
@@ -360,7 +360,7 @@ ret_unmap: | |||
360 | iounmap(pmcmsptwi_data.iobase); | 360 | iounmap(pmcmsptwi_data.iobase); |
361 | 361 | ||
362 | ret_unreserve: | 362 | ret_unreserve: |
363 | release_mem_region(res->start, res->end - res->start + 1); | 363 | release_mem_region(res->start, resource_size(res)); |
364 | 364 | ||
365 | ret_err: | 365 | ret_err: |
366 | return rc; | 366 | return rc; |
@@ -385,7 +385,7 @@ static int __devexit pmcmsptwi_remove(struct platform_device *pldev) | |||
385 | iounmap(pmcmsptwi_data.iobase); | 385 | iounmap(pmcmsptwi_data.iobase); |
386 | 386 | ||
387 | res = platform_get_resource(pldev, IORESOURCE_MEM, 0); | 387 | res = platform_get_resource(pldev, IORESOURCE_MEM, 0); |
388 | release_mem_region(res->start, res->end - res->start + 1); | 388 | release_mem_region(res->start, resource_size(res)); |
389 | 389 | ||
390 | return 0; | 390 | return 0; |
391 | } | 391 | } |