Patchwork excite_nandflash.c: user resource_size()

login
register
mail settings
Submitter hartleys
Date Dec. 14, 2009, 9:18 p.m.
Message ID <BD79186B4FD85F4B8E60E381CAEE19090200EA4A@mi8nycmail19.Mi8.com>
Download mbox | patch
Permalink /patch/41142/
State New
Headers show

Comments

hartleys - Dec. 14, 2009, 9:18 p.m.
Use resource_size().

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

---

Patch

diff --git a/drivers/mtd/nand/excite_nandflash.c b/drivers/mtd/nand/excite_nandflash.c
index 72446fb..bd323e4 100644
--- a/drivers/mtd/nand/excite_nandflash.c
+++ b/drivers/mtd/nand/excite_nandflash.c
@@ -79,7 +79,7 @@  excite_nand_map_regs(struct platform_device *d, const char *basename)
 	    excite_nand_get_resource(d, IORESOURCE_MEM, basename);
 
 	if (r)
-		result = ioremap_nocache(r->start, r->end + 1 - r->start);
+		result = ioremap_nocache(r->start, resource_size(r));
 	return result;
 }