lkml.org 
[lkml]   [2009]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 5/7] 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>
---
drivers/spi/spi_s3c24xx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: b/drivers/spi/spi_s3c24xx.c
===================================================================
--- a/drivers/spi/spi_s3c24xx.c 2009-08-08 09:53:33.000000000 +0100
+++ b/drivers/spi/spi_s3c24xx.c 2009-08-08 09:54:03.000000000 +0100
@@ -299,7 +299,7 @@ static int __init s3c24xx_spi_probe(stru
goto err_no_iores;
}

- hw->ioarea = request_mem_region(res->start, (res->end - res->start)+1,
+ hw->ioarea = request_mem_region(res->start, resource_size(res),
pdev->name);

if (hw->ioarea == NULL) {
@@ -308,7 +308,7 @@ static int __init s3c24xx_spi_probe(stru
goto err_no_iores;
}

- hw->regs = ioremap(res->start, (res->end - res->start)+1);
+ hw->regs = ioremap(res->start, resource_size(res));
if (hw->regs == NULL) {
dev_err(&pdev->dev, "Cannot map IO\n");
err = -ENXIO;
--


\
 
 \ /
  Last update: 2009-08-13 12:07    [W:0.066 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site