diff options
author | Joe Perches <joe@perches.com> | 2011-06-09 12:13:32 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-06-10 08:55:36 -0400 |
commit | 28f65c11f2ffb3957259dece647a24f8ad2e241b (patch) | |
tree | 6b7621d09d10df89eedd908d4506fb9f457a909f /drivers/video/controlfb.c | |
parent | 140a1ef2f91a00e1d25f0878c193abdc25bf6ebe (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/controlfb.c')
-rw-r--r-- | drivers/video/controlfb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/controlfb.c b/drivers/video/controlfb.c index c225dcce89e7..9075bea55879 100644 --- a/drivers/video/controlfb.c +++ b/drivers/video/controlfb.c | |||
@@ -709,11 +709,11 @@ static int __init control_of_init(struct device_node *dp) | |||
709 | 709 | ||
710 | /* Map in frame buffer and registers */ | 710 | /* Map in frame buffer and registers */ |
711 | p->fb_orig_base = fb_res.start; | 711 | p->fb_orig_base = fb_res.start; |
712 | p->fb_orig_size = fb_res.end - fb_res.start + 1; | 712 | p->fb_orig_size = resource_size(&fb_res); |
713 | /* use the big-endian aperture (??) */ | 713 | /* use the big-endian aperture (??) */ |
714 | p->frame_buffer_phys = fb_res.start + 0x800000; | 714 | p->frame_buffer_phys = fb_res.start + 0x800000; |
715 | p->control_regs_phys = reg_res.start; | 715 | p->control_regs_phys = reg_res.start; |
716 | p->control_regs_size = reg_res.end - reg_res.start + 1; | 716 | p->control_regs_size = resource_size(®_res); |
717 | 717 | ||
718 | if (!p->fb_orig_base || | 718 | if (!p->fb_orig_base || |
719 | !request_mem_region(p->fb_orig_base,p->fb_orig_size,"controlfb")) { | 719 | !request_mem_region(p->fb_orig_base,p->fb_orig_size,"controlfb")) { |