Skip to content

Commit

Permalink
i2c-s3c2410: use resource_size()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Dooks committed Jun 16, 2009
1 parent c6ffdde commit 933a2ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/i2c/busses/i2c-s3c2410.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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");
Expand Down

0 comments on commit 933a2ae

Please sign in to comment.