From 933a2aec8d08cda11c4b427ea7930b0e92eb9bc8 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Sun, 14 Jun 2009 14:04:20 +0100 Subject: 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 --- drivers/i2c/busses/i2c-s3c2410.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') 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) 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"); -- cgit v1.2.2