diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-davinci.c')
-rw-r--r-- | drivers/i2c/busses/i2c-davinci.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index 1f3d89c3194a..c89687a10835 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c | |||
@@ -515,7 +515,7 @@ static int davinci_i2c_probe(struct platform_device *pdev) | |||
515 | return -ENODEV; | 515 | return -ENODEV; |
516 | } | 516 | } |
517 | 517 | ||
518 | ioarea = request_mem_region(mem->start, (mem->end - mem->start) + 1, | 518 | ioarea = request_mem_region(mem->start, resource_size(mem), |
519 | pdev->name); | 519 | pdev->name); |
520 | if (!ioarea) { | 520 | if (!ioarea) { |
521 | dev_err(&pdev->dev, "I2C region already claimed\n"); | 521 | dev_err(&pdev->dev, "I2C region already claimed\n"); |
@@ -578,7 +578,7 @@ err_free_mem: | |||
578 | put_device(&pdev->dev); | 578 | put_device(&pdev->dev); |
579 | kfree(dev); | 579 | kfree(dev); |
580 | err_release_region: | 580 | err_release_region: |
581 | release_mem_region(mem->start, (mem->end - mem->start) + 1); | 581 | release_mem_region(mem->start, resource_size(mem)); |
582 | 582 | ||
583 | return r; | 583 | return r; |
584 | } | 584 | } |
@@ -601,7 +601,7 @@ static int davinci_i2c_remove(struct platform_device *pdev) | |||
601 | kfree(dev); | 601 | kfree(dev); |
602 | 602 | ||
603 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 603 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
604 | release_mem_region(mem->start, (mem->end - mem->start) + 1); | 604 | release_mem_region(mem->start, resource_size(mem)); |
605 | return 0; | 605 | return 0; |
606 | } | 606 | } |
607 | 607 | ||