提交 e3396b26 编写于 作者: D Dan Carpenter 提交者: Eric Miao

pxa168fb: fix incorrect resource calculation

The size calculation is not correct.  It should be end - start + 1.
Use resource_size() to caculate it.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NEric Miao <eric.y.miao@gmail.com>
上级 fe3ebaad
...@@ -668,7 +668,7 @@ static int __init pxa168fb_probe(struct platform_device *pdev) ...@@ -668,7 +668,7 @@ static int __init pxa168fb_probe(struct platform_device *pdev)
/* /*
* Map LCD controller registers. * Map LCD controller registers.
*/ */
fbi->reg_base = ioremap_nocache(res->start, res->end - res->start); fbi->reg_base = ioremap_nocache(res->start, resource_size(res));
if (fbi->reg_base == NULL) { if (fbi->reg_base == NULL) {
ret = -ENOMEM; ret = -ENOMEM;
goto failed; goto failed;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册