aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-03-22 08:10:35 -0400
committerEric Miao <eric.y.miao@gmail.com>2010-03-22 08:30:17 -0400
commite3396b263c6a8f086a99f1d524272ff409d66de0 (patch)
tree97830bac8a93f34162f9e30f7c2dda4bc128c299 /drivers/video
parentfe3ebaad3229c5e842e8b24cf2a24d7049a6481c (diff)
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>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/pxa168fb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/pxa168fb.c b/drivers/video/pxa168fb.c
index 75285d3f393c..c91a7f70f7b0 100644
--- a/drivers/video/pxa168fb.c
+++ b/drivers/video/pxa168fb.c
@@ -668,7 +668,7 @@ static int __init pxa168fb_probe(struct platform_device *pdev)
668 /* 668 /*
669 * Map LCD controller registers. 669 * Map LCD controller registers.
670 */ 670 */
671 fbi->reg_base = ioremap_nocache(res->start, res->end - res->start); 671 fbi->reg_base = ioremap_nocache(res->start, resource_size(res));
672 if (fbi->reg_base == NULL) { 672 if (fbi->reg_base == NULL) {
673 ret = -ENOMEM; 673 ret = -ENOMEM;
674 goto failed; 674 goto failed;