Browse Source

mxc nand: use resource_size()

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer 16 years ago
parent
commit
d970a0730b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/mtd/nand/mxc_nand.c

+ 1 - 1
drivers/mtd/nand/mxc_nand.c

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