[PATCH 08/19] mxc nand: use resource_size()

Sascha Hauer s.hauer at pengutronix.de
Wed Oct 21 10:13:15 EDT 2009


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 74c5dbc..127e0b7 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;
-- 
1.6.5




More information about the linux-mtd mailing list