summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Weitzel <j.weitzel@phytec.de>2013-03-28 11:19:50 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-04-02 09:07:31 +0200
commit977625a051b47329500efaae782848864117a17d (patch)
treec755791c6800eec9910d801373d0bebcfe6fb2f1
parent74406ae9ad68fef4c294f1e9b4eb9b0bba74047d (diff)
downloadbarebox-977625a051b47329500efaae782848864117a17d.tar.gz
barebox-977625a051b47329500efaae782848864117a17d.tar.xz
fb: calculate resource end
commit 5f03074 changed storing struct resource end insted of size. Fix calculation of end in fb Signed-off-by: Jan Weitzel <j.weitzel@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/video/fb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/fb.c b/drivers/video/fb.c
index ee532723e8..be2969540d 100644
--- a/drivers/video/fb.c
+++ b/drivers/video/fb.c
@@ -86,7 +86,7 @@ static int fb_setup_mode(struct device_d *dev, struct param_d *param,
if (!ret) {
dev->resource[0].start = (resource_size_t)info->screen_base;
info->cdev.size = info->xres * info->yres * (info->bits_per_pixel >> 3);
- dev->resource[0].end = info->cdev.size - 1;
+ dev->resource[0].end = dev->resource[0].start + info->cdev.size - 1;
dev_param_set_generic(dev, param, val);
} else
info->cdev.size = 0;
@@ -116,7 +116,7 @@ int register_framebuffer(struct fb_info *info)
info->cdev.priv = info;
dev->resource = xzalloc(sizeof(struct resource));
dev->resource[0].start = (resource_size_t)info->screen_base;
- dev->resource[0].end = info->cdev.size - 1;
+ dev->resource[0].end = dev->resource[0].start + info->cdev.size - 1;
dev->resource[0].flags = IORESOURCE_MEM;
dev->num_resources = 1;