summaryrefslogtreecommitdiffstats
path: root/drivers/video/controlfb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/controlfb.c')
-rw-r--r--drivers/video/controlfb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/controlfb.c b/drivers/video/controlfb.c
index c225dcce89e..9075bea5587 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)
/* Map in frame buffer and registers */
p->fb_orig_base = fb_res.start;
- p->fb_orig_size = fb_res.end - fb_res.start + 1;
+ p->fb_orig_size = resource_size(&fb_res);
/* use the big-endian aperture (??) */
p->frame_buffer_phys = fb_res.start + 0x800000;
p->control_regs_phys = reg_res.start;
- p->control_regs_size = reg_res.end - reg_res.start + 1;
+ p->control_regs_size = resource_size(&reg_res);
if (!p->fb_orig_base ||
!request_mem_region(p->fb_orig_base,p->fb_orig_size,"controlfb")) {