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

Submitted by Sascha Hauer on Oct. 21, 2009, 2:13 p.m.

Details

Message ID 1256134406-25251-9-git-send-email-s.hauer@pengutronix.de
State Accepted
Commit d970a0730ba5598b711d42bac287a17db5b6268a
Headers show

Commit Message

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 hide | download patch | download mbox

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;