mtd: drivers/mtd/nand/sh_flctl.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=cbd38a875fd890c3c2f196dd3370d90fd3ecb7f5
Commit:     cbd38a875fd890c3c2f196dd3370d90fd3ecb7f5
Parent:     448791abfb64f097e6d6c5f71df68fd072def5b3
Author:     H Hartley Sweeten <hartleys at visionengravers.com>
AuthorDate: Mon Dec 14 16:59:27 2009 -0500
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Thu Dec 31 20:47:26 2009 +0000

    mtd: drivers/mtd/nand/sh_flctl.c: use resource_size()
    
    Use resource_size().
    
    Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
    Acked-by: Yoshihiro Shimoda <shimoda.yoshihiro at renesas.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/nand/sh_flctl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c
index 02bef21..4260ab7 100644
--- a/drivers/mtd/nand/sh_flctl.c
+++ b/drivers/mtd/nand/sh_flctl.c
@@ -797,7 +797,7 @@ static int __init flctl_probe(struct platform_device *pdev)
 		goto err;
 	}
 
-	flctl->reg = ioremap(res->start, res->end - res->start + 1);
+	flctl->reg = ioremap(res->start, resource_size(res));
 	if (flctl->reg == NULL) {
 		printk(KERN_ERR "%s: ioremap error.\n", __func__);
 		ret = -ENOMEM;



More information about the linux-mtd-cvs mailing list