summaryrefslogtreecommitdiffstats
path: root/drivers/video/fb.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-07-25 17:47:02 +0800
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-07-30 02:05:26 +0800
commit6147b6a6ca913b8919fe7b7f5ec45b6cc97dbddf (patch)
treec03d01fcfd70800de4a69c594a8f78d459748384 /drivers/video/fb.c
parent715b4e7ae39f2b8d70b53a68fcdbcdb39c1a1a7e (diff)
downloadbarebox-6147b6a6ca913b8919fe7b7f5ec45b6cc97dbddf.tar.gz
barebox-6147b6a6ca913b8919fe7b7f5ec45b6cc97dbddf.tar.xz
fb: switch to "struct resource"
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'drivers/video/fb.c')
-rw-r--r--drivers/video/fb.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/video/fb.c b/drivers/video/fb.c
index 85db9044c8..0be465f892 100644
--- a/drivers/video/fb.c
+++ b/drivers/video/fb.c
@@ -84,9 +84,9 @@ static int fb_setup_mode(struct device_d *dev, struct param_d *param,
ret = info->fbops->fb_activate_var(info);
if (!ret) {
- dev->map_base = (unsigned long)info->screen_base;
+ dev->resource[0].start = (resource_size_t)info->screen_base;
info->cdev.size = info->xres * info->yres * (info->bits_per_pixel >> 3);
- dev->size = info->cdev.size;
+ dev->resource[0].size = info->cdev.size;
dev_param_set_generic(dev, param, val);
} else
info->cdev.size = 0;
@@ -107,15 +107,19 @@ int register_framebuffer(struct fb_info *info)
int id = get_free_deviceid("fb");
struct device_d *dev;
+ dev = &info->dev;
+
info->cdev.ops = &fb_ops;
info->cdev.name = asprintf("fb%d", id);
info->cdev.size = info->xres * info->yres * (info->bits_per_pixel >> 3);
- info->cdev.dev = &info->dev;
+ info->cdev.dev = dev;
info->cdev.priv = info;
- info->cdev.dev->map_base = (unsigned long)info->screen_base;
- info->cdev.dev->size = info->cdev.size;
+ dev->resource = xzalloc(sizeof(struct resource));
+ dev->resource[0].start = (resource_size_t)info->screen_base;
+ dev->resource[0].size = info->cdev.size;
+ dev->resource[0].flags = IORESOURCE_MEM;
+ dev->num_resources = 1;
- dev = &info->dev;
dev->priv = info;
dev->id = id;