Skip to content
Snippets Groups Projects
Commit 4442241e authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by David Woodhouse
Browse files

mtd: nomadik_nand.c: use resource_size()


Use resource_size().

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent db5a5ae2
No related branches found
No related tags found
No related merge requests found
...@@ -104,21 +104,21 @@ static int nomadik_nand_probe(struct platform_device *pdev) ...@@ -104,21 +104,21 @@ static int nomadik_nand_probe(struct platform_device *pdev)
ret = -EIO; ret = -EIO;
goto err_unmap; 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"); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nand_data");
if (!res) { if (!res) {
ret = -EIO; ret = -EIO;
goto err_unmap; 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"); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nand_cmd");
if (!res) { if (!res) {
ret = -EIO; ret = -EIO;
goto err_unmap; 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) { if (!host->addr_va || !host->data_va || !host->cmd_va) {
ret = -ENOMEM; ret = -ENOMEM;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment