Patchwork mxc_nand.c: use resource_size()

login
register
mail settings
Submitter hartleys
Date Dec. 14, 2009, 9:33 p.m.
Message ID <BD79186B4FD85F4B8E60E381CAEE19090200EA56@mi8nycmail19.Mi8.com>
Download mbox | patch
Permalink /patch/41147/
State New
Headers show

Comments

hartleys - Dec. 14, 2009, 9:33 p.m.
Use resource_size().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
David Woodhouse <dwmw2@infradead.org>

---

Patch

diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 65b26d5..fb58894 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -920,7 +920,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;