aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/msm/msm_fb.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-06-09 12:13:32 -0400
committerJiri Kosina <jkosina@suse.cz>2011-06-10 08:55:36 -0400
commit28f65c11f2ffb3957259dece647a24f8ad2e241b (patch)
tree6b7621d09d10df89eedd908d4506fb9f457a909f /drivers/video/msm/msm_fb.c
parent140a1ef2f91a00e1d25f0878c193abdc25bf6ebe (diff)
treewide: Convert uses of struct resource to resource_size(ptr)
Several fixes as well where the +1 was missing. Done via coccinelle scripts like: @@ struct resource *ptr; @@ - ptr->end - ptr->start + 1 + resource_size(ptr) and some grep and typing. Mostly uncompiled, no cross-compilers. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/video/msm/msm_fb.c')
-rw-r--r--drivers/video/msm/msm_fb.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/video/msm/msm_fb.c b/drivers/video/msm/msm_fb.c
index ec351309e607..c6e3b4fcdd68 100644
--- a/drivers/video/msm/msm_fb.c
+++ b/drivers/video/msm/msm_fb.c
@@ -525,10 +525,9 @@ static int setup_fbmem(struct msmfb_info *msmfb, struct platform_device *pdev)
525 return -ENOMEM; 525 return -ENOMEM;
526 } 526 }
527 fb->fix.smem_start = resource->start; 527 fb->fix.smem_start = resource->start;
528 fb->fix.smem_len = resource->end - resource->start; 528 fb->fix.smem_len = resource_size(resource);
529 fbram = ioremap(resource->start, 529 fbram = ioremap(resource->start, resource_size(resource));
530 resource->end - resource->start); 530 if (fbram == NULL) {
531 if (fbram == 0) {
532 printk(KERN_ERR "msmfb: cannot allocate fbram!\n"); 531 printk(KERN_ERR "msmfb: cannot allocate fbram!\n");
533 return -ENOMEM; 532 return -ENOMEM;
534 } 533 }