aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Dooks <ben@simtec.co.uk>2009-09-22 19:46:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 10:39:44 -0400
commitb5e3afb5e32c9acf69fcc17961c3fddc47e9cc06 (patch)
treecd53de99458f63ba4e55b708484438877be57402
parent1a0c220f791be9e15fd897adee257e72ed4134f8 (diff)
spi_s3c24xx: use resource_size() to get resource size
Change the use of (res->end - res->start) to use resource_size() to get the size of the resource. Signed-off-by; Ben Dooks <ben@simtec.co.uk> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/spi/spi_s3c24xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c
index 0be4da0917e0..705841fb4ca0 100644
--- a/drivers/spi/spi_s3c24xx.c
+++ b/drivers/spi/spi_s3c24xx.c
@@ -299,7 +299,7 @@ static int __init s3c24xx_spi_probe(struct platform_device *pdev)
299 goto err_no_iores; 299 goto err_no_iores;
300 } 300 }
301 301
302 hw->ioarea = request_mem_region(res->start, (res->end - res->start)+1, 302 hw->ioarea = request_mem_region(res->start, resource_size(res),
303 pdev->name); 303 pdev->name);
304 304
305 if (hw->ioarea == NULL) { 305 if (hw->ioarea == NULL) {
@@ -308,7 +308,7 @@ static int __init s3c24xx_spi_probe(struct platform_device *pdev)
308 goto err_no_iores; 308 goto err_no_iores;
309 } 309 }
310 310
311 hw->regs = ioremap(res->start, (res->end - res->start)+1); 311 hw->regs = ioremap(res->start, resource_size(res));
312 if (hw->regs == NULL) { 312 if (hw->regs == NULL) {
313 dev_err(&pdev->dev, "Cannot map IO\n"); 313 dev_err(&pdev->dev, "Cannot map IO\n");
314 err = -ENXIO; 314 err = -ENXIO;