mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-07 13:43:51 +00:00
mtd: nomadik_nand.c: use resource_size()
Use resource_size(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
parent
db5a5ae25a
commit
4442241ef6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user