From: Dan Carpenter Date: Mon, 22 Mar 2010 12:10:35 +0000 (+0300) Subject: pxa168fb: fix incorrect resource calculation X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=e3396b263c6a8f086a99f1d524272ff409d66de0;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Eric Miao --- 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) /* * 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;