提交 d8bc5555 编写于 作者: H H Hartley Sweeten 提交者: David Woodhouse

mtd: davinci_nand.c: use resource_size()

The ioremap'ed sizes are off by 1; use resource_size() for correct value.
Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 440d4f9f
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册