excite_nandflash.c: user resource_size()

Submitted by hartleys on Dec. 14, 2009, 9:18 p.m.

Details

Message ID BD79186B4FD85F4B8E60E381CAEE19090200EA4A@mi8nycmail19.Mi8.com
State New, archived
Headers show

Commit Message

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 hide | download patch | download mbox

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;
 }