mxc nand: use resource_size()
authorSascha Hauer <s.hauer@pengutronix.de>
Thu, 4 Jun 2009 14:16:01 +0000 (16:16 +0200)
committerSascha Hauer <s.hauer@pengutronix.de>
Thu, 12 Nov 2009 07:32:24 +0000 (08:32 +0100)
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
drivers/mtd/nand/mxc_nand.c

index 1ffb854f989ec1c326ad68418e26786663c33e06..8fcb33da8efcf03725f0731647e6d3061601e4cc 100644 (file)
@@ -865,7 +865,7 @@ static int __init mxcnd_probe(struct platform_device *pdev)
                goto eres;
        }
 
-       host->regs = ioremap(res->start, res->end - res->start + 1);
+       host->regs = ioremap(res->start, resource_size(res));
        if (!host->regs) {
                err = -ENOMEM;
                goto eres;