mtd: fsl_elbc_nand.c: user resource_size()
authorH Hartley Sweeten <hartleys@visionengravers.com>
Mon, 14 Dec 2009 21:19:44 +0000 (16:19 -0500)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 31 Dec 2009 19:53:51 +0000 (19:53 +0000)
Use resource_size().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/fsl_elbc_nand.c

index ae30fb6eed970d245b7c98dd8bab72c6c38630bf..1b8328fbb9dc0178bde5407ffb8c2ebd5557d181 100644 (file)
@@ -874,7 +874,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;