Skip to content

Commit

Permalink
pxa168fb: fix incorrect resource calculation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
error27 authored and ericmiao committed Mar 22, 2010
1 parent fe3ebaa commit e3396b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/pxa168fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ static int __init pxa168fb_probe(struct platform_device *pdev)
/*
* 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) {
ret = -ENOMEM;
goto failed;
Expand Down

0 comments on commit e3396b2

Please sign in to comment.