mtd: drivers/mtd/nand/sh_flctl.c: use resource_size()
authorH Hartley Sweeten <hartleys@visionengravers.com>
Mon, 14 Dec 2009 21:59:27 +0000 (16:59 -0500)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 31 Dec 2009 20:47:26 +0000 (20:47 +0000)
Use resource_size().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/sh_flctl.c

index 02bef21f2e4b987099a8f1f8d856c7364cbf9a58..4260ab78f95c3c8404f40afac0028fd76d518b20 100644 (file)
@@ -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;