[PATCH] mxc_nand.c: use resource_size()

From: H Hartley Sweeten
Date: Mon Dec 14 2009 - 16:33:38 EST


Use resource_size().

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
David Woodhouse <dwmw2@xxxxxxxxxxxxx>

---

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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/