lkml.org 
[lkml]   [2009]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] mxc_nand.c: use resource_size()
Date
From
Use resource_size().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
David Woodhouse <dwmw2@infradead.org>

---

diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 65b26d5..fb58894 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -920,7 +920,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;

\
 
 \ /
  Last update: 2009-12-14 22:35    [W:0.022 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site