Patchwork fsl_elbc_nand.c: user resource_size()

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

Comments

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

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

---

Patch

diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index ddd37d2..f5ed403 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -883,7 +883,7 @@  static int __devinit fsl_elbc_chip_probe(struct fsl_elbc_ctrl *ctrl,
 	priv->ctrl = ctrl;
 	priv->dev = ctrl->dev;
 
-	priv->vbase = ioremap(res.start, res.end - res.start + 1);
+	priv->vbase = ioremap(res.start, resource_size(&res));
 	if (!priv->vbase) {
 		dev_err(ctrl->dev, "failed to map chip region\n");
 		ret = -ENOMEM;