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

login
register
mail settings
Submitter Sascha Hauer
Date Oct. 21, 2009, 2:13 p.m.
Message ID <1256134406-25251-9-git-send-email-s.hauer@pengutronix.de>
Download mbox | patch
Permalink /patch/36575/
State New
Headers show

Comments

Sascha Hauer - Oct. 21, 2009, 2:13 p.m.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/mtd/nand/mxc_nand.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

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;