From: H Hartley Sweeten Date: Mon, 14 Dec 2009 21:59:27 +0000 (-0500) Subject: mtd: drivers/mtd/nand/sh_flctl.c: use resource_size() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=cbd38a875fd890c3c2f196dd3370d90fd3ecb7f5;p=linux-beck.git mtd: drivers/mtd/nand/sh_flctl.c: use resource_size() Use resource_size(). Signed-off-by: H Hartley Sweeten Acked-by: Yoshihiro Shimoda Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c index 02bef21f2e4b..4260ab78f95c 100644 --- a/drivers/mtd/nand/sh_flctl.c +++ b/drivers/mtd/nand/sh_flctl.c @@ -797,7 +797,7 @@ static int __init flctl_probe(struct platform_device *pdev) goto err; } - flctl->reg = ioremap(res->start, res->end - res->start + 1); + flctl->reg = ioremap(res->start, resource_size(res)); if (flctl->reg == NULL) { printk(KERN_ERR "%s: ioremap error.\n", __func__); ret = -ENOMEM;