mxc nand: use resource_size()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Nov 30 07:59:04 EST 2009


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=d970a0730ba5598b711d42bac287a17db5b6268a
Commit:     d970a0730ba5598b711d42bac287a17db5b6268a
Parent:     a4ad57f8b320c9d89b7693be82e47347425db918
Author:     Sascha Hauer <s.hauer at pengutronix.de>
AuthorDate: Thu Jun 4 16:16:01 2009 +0200
Committer:  Sascha Hauer <s.hauer at pengutronix.de>
CommitDate: Thu Nov 12 08:32:24 2009 +0100

    mxc nand: use resource_size()
    
    Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/mtd/nand/mxc_nand.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 1ffb854..8fcb33d 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -865,7 +865,7 @@ static int __init mxcnd_probe(struct platform_device *pdev)
 		goto eres;
 	}
 
-	host->regs = ioremap(res->start, res->end - res->start + 1);
+	host->regs = ioremap(res->start, resource_size(res));
 	if (!host->regs) {
 		err = -ENOMEM;
 		goto eres;



More information about the linux-mtd-cvs mailing list