diff options
author | Ben Dooks <ben-linux@fluff.org> | 2009-06-14 09:04:20 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2009-06-16 17:42:16 -0400 |
commit | 933a2aec8d08cda11c4b427ea7930b0e92eb9bc8 (patch) | |
tree | 34ea85ced980dae70799aef84cfe240ea57d7fad /drivers/i2c | |
parent | c6ffddea36dd576b70dfbd10eb5d2b287b786dca (diff) |
i2c-s3c2410: use resource_size()
Change the usage of res->end-res->start to resource_size(), missed
by the last patch to change this.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-s3c2410.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 079a312d36fd..8f42a4536cdf 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c | |||
@@ -828,7 +828,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) | |||
828 | goto err_clk; | 828 | goto err_clk; |
829 | } | 829 | } |
830 | 830 | ||
831 | i2c->ioarea = request_mem_region(res->start, (res->end-res->start)+1, | 831 | i2c->ioarea = request_mem_region(res->start, resource_size(res), |
832 | pdev->name); | 832 | pdev->name); |
833 | 833 | ||
834 | if (i2c->ioarea == NULL) { | 834 | if (i2c->ioarea == NULL) { |
@@ -837,7 +837,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) | |||
837 | goto err_clk; | 837 | goto err_clk; |
838 | } | 838 | } |
839 | 839 | ||
840 | i2c->regs = ioremap(res->start, (res->end-res->start)+1); | 840 | i2c->regs = ioremap(res->start, resource_size(res)); |
841 | 841 | ||
842 | if (i2c->regs == NULL) { | 842 | if (i2c->regs == NULL) { |
843 | dev_err(&pdev->dev, "cannot map IO\n"); | 843 | dev_err(&pdev->dev, "cannot map IO\n"); |