mtd: drivers/mtd/nand/s3c2410.c: use resource_size()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Thu Dec 31 15:59:02 EST 2009


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=fc161c4e8ec9b12d42b10d510a9de8562ea3afac
Commit:     fc161c4e8ec9b12d42b10d510a9de8562ea3afac
Parent:     e99030609e27abff7e1a868cb56384c678b09984
Author:     H Hartley Sweeten <hartleys at visionengravers.com>
AuthorDate: Mon Dec 14 16:56:22 2009 -0500
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Thu Dec 31 20:47:22 2009 +0000

    mtd: drivers/mtd/nand/s3c2410.c: use resource_size()
    
    Use resource_size().
    
    Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
    Cc: Ben Dooks <ben-linux at fluff.org>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/nand/s3c2410.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
index fa6e9c7..c41ad22 100644
--- a/drivers/mtd/nand/s3c2410.c
+++ b/drivers/mtd/nand/s3c2410.c
@@ -957,7 +957,7 @@ static int s3c24xx_nand_probe(struct platform_device *pdev)
 
 	/* currently we assume we have the one resource */
 	res  = pdev->resource;
-	size = res->end - res->start + 1;
+	size = resource_size(res);
 
 	info->area = request_mem_region(res->start, size, pdev->name);
 



More information about the linux-mtd-cvs mailing list