Skip to content

Commit

Permalink
mtd: nomadik_nand.c: use resource_size()
Browse files Browse the repository at this point in the history
Use resource_size().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
H Hartley Sweeten authored and David Woodhouse committed Dec 31, 2009
1 parent db5a5ae commit 4442241
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/mtd/nand/nomadik_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4442241

Please sign in to comment.