mtd: nomadik_nand.c: use resource_size()
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Thu Dec 31 15:59:02 EST 2009
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=4442241ef6ed4d53c13d1c4b18fd57918bb4c850
Commit: 4442241ef6ed4d53c13d1c4b18fd57918bb4c850
Parent: db5a5ae25aae66354712674b1643759897ff0325
Author: H Hartley Sweeten <hartleys at visionengravers.com>
AuthorDate: Mon Dec 14 16:36:37 2009 -0500
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Thu Dec 31 20:47:18 2009 +0000
mtd: nomadik_nand.c: use resource_size()
Use resource_size().
Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/nand/nomadik_nand.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/nand/nomadik_nand.c b/drivers/mtd/nand/nomadik_nand.c
index 6612341..59cbf66 100644
--- a/drivers/mtd/nand/nomadik_nand.c
+++ b/drivers/mtd/nand/nomadik_nand.c
@@ -104,21 +104,21 @@ static int nomadik_nand_probe(struct platform_device *pdev)
ret = -EIO;
goto err_unmap;
}
- host->addr_va = ioremap(res->start, res->end - res->start + 1);
+ host->addr_va = ioremap(res->start, resource_size(res));
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nand_data");
if (!res) {
ret = -EIO;
goto err_unmap;
}
- host->data_va = ioremap(res->start, res->end - res->start + 1);
+ host->data_va = ioremap(res->start, resource_size(res));
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nand_cmd");
if (!res) {
ret = -EIO;
goto err_unmap;
}
- host->cmd_va = ioremap(res->start, res->end - res->start + 1);
+ host->cmd_va = ioremap(res->start, resource_size(res));
if (!host->addr_va || !host->data_va || !host->cmd_va) {
ret = -ENOMEM;
More information about the linux-mtd-cvs
mailing list