aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/mxc_nand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 1ffb854f989..8fcb33da8ef 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -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;