Commit 933a2aec authored by Ben Dooks's avatar Ben Dooks

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: default avatarBen Dooks <ben-linux@fluff.org>
parent c6ffddea
...@@ -828,7 +828,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) ...@@ -828,7 +828,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
goto err_clk; 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); pdev->name);
if (i2c->ioarea == NULL) { if (i2c->ioarea == NULL) {
...@@ -837,7 +837,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) ...@@ -837,7 +837,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
goto err_clk; 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) { if (i2c->regs == NULL) {
dev_err(&pdev->dev, "cannot map IO\n"); dev_err(&pdev->dev, "cannot map IO\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment