]> git.karo-electronics.de Git - linux-beck.git/commitdiff
i2c-s3c2410: use resource_size()
authorBen Dooks <ben-linux@fluff.org>
Sun, 14 Jun 2009 13:04:20 +0000 (14:04 +0100)
committerBen Dooks <ben-linux@fluff.org>
Tue, 16 Jun 2009 21:42:16 +0000 (22:42 +0100)
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>
drivers/i2c/busses/i2c-s3c2410.c

index 079a312d36fd098422a842e53e00b59ac758f395..8f42a4536cdf872d6f10ed8cc4b738d26e642df1 100644 (file)
@@ -828,7 +828,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
                goto err_clk;
        }
 
-       i2c->ioarea = request_mem_region(res->start, (res->end-res->start)+1,
+       i2c->ioarea = request_mem_region(res->start, resource_size(res),
                                         pdev->name);
 
        if (i2c->ioarea == NULL) {
@@ -837,7 +837,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
                goto err_clk;
        }
 
-       i2c->regs = ioremap(res->start, (res->end-res->start)+1);
+       i2c->regs = ioremap(res->start, resource_size(res));
 
        if (i2c->regs == NULL) {
                dev_err(&pdev->dev, "cannot map IO\n");