mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-16 07:24:39 +08:00
mtd: davinci_nand.c: use resource_size()
The ioremap'ed sizes are off by 1; use resource_size() for correct value. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
parent
440d4f9fb6
commit
d8bc55553c
@ -566,8 +566,8 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
|
||||
goto err_nomem;
|
||||
}
|
||||
|
||||
vaddr = ioremap(res1->start, res1->end - res1->start);
|
||||
base = ioremap(res2->start, res2->end - res2->start);
|
||||
vaddr = ioremap(res1->start, resource_size(res1));
|
||||
base = ioremap(res2->start, resource_size(res2));
|
||||
if (!vaddr || !base) {
|
||||
dev_err(&pdev->dev, "ioremap failed\n");
|
||||
ret = -EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user