mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 08:46:46 +00:00
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: Dan Carpenter <error27@gmail.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
This commit is contained in:
parent
fe3ebaad32
commit
e3396b263c
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue