From: H Hartley Sweeten Date: Mon, 14 Dec 2009 21:19:44 +0000 (-0500) Subject: mtd: fsl_elbc_nand.c: user resource_size() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8a19b5581862650ab1735d4699491ac92bd2e212;p=openwrt%2Fstaging%2Fblogic.git mtd: fsl_elbc_nand.c: user resource_size() Use resource_size(). Signed-off-by: H Hartley Sweeten Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index ae30fb6eed97..1b8328fbb9dc 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c @@ -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;