From: H Hartley Sweeten Date: Mon, 14 Dec 2009 21:22:49 +0000 (-0500) Subject: mtd: fls_upm.c: use resource_size() X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=58e6a84dfbd6f125b69e8b105c2cdbf22f97d5de;p=deliverable%2Flinux.git mtd: fls_upm.c: use resource_size() Use resource_size(). Signed-off-by: H Hartley Sweeten Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c index 071a60cb4204..ab06a5b514a9 100644 --- a/drivers/mtd/nand/fsl_upm.c +++ b/drivers/mtd/nand/fsl_upm.c @@ -302,7 +302,7 @@ static int __devinit fun_probe(struct of_device *ofdev, FSL_UPM_WAIT_WRITE_BYTE; fun->io_base = devm_ioremap_nocache(&ofdev->dev, io_res.start, - io_res.end - io_res.start + 1); + resource_size(&io_res)); if (!fun->io_base) { ret = -ENOMEM; goto err2;