summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-09-21 19:45:57 +0800
committerSascha Hauer <s.hauer@pengutronix.de>2012-10-04 15:19:12 +0200
commitc0620a4b50c46d98c08229db4bec6b4e4a68b16b (patch)
tree8bca775381ff2f369887472f2a23691f52737242 /drivers
parent638e059aba994dc8a77f81ad5e826f1706aecc00 (diff)
downloadbarebox-c0620a4b50c46d98c08229db4bec6b4e4a68b16b.tar.gz
barebox-c0620a4b50c46d98c08229db4bec6b4e4a68b16b.tar.xz
fb: move add param to bus probe
so the param add added only of the device successed to register. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/fb.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/video/fb.c b/drivers/video/fb.c
index ae6ff74cab..ee532723e8 100644
--- a/drivers/video/fb.c
+++ b/drivers/video/fb.c
@@ -127,16 +127,6 @@ int register_framebuffer(struct fb_info *info)
info->dev.bus = &fb_bus;
register_device(&info->dev);
- dev_add_param(dev, "enable", fb_enable_set, NULL, 0);
- dev_set_param(dev, "enable", "0");
-
- if (info->num_modes && (info->mode_list != NULL) &&
- (info->fbops->fb_activate_var != NULL)) {
- dev_add_param(dev, "mode_name", fb_setup_mode, NULL, 0);
- dev_set_param(dev, "mode_name", info->mode_list[0].name);
- }
-
- devfs_create(&info->cdev);
return 0;
}
@@ -173,7 +163,18 @@ static int fb_match(struct device_d *dev, struct driver_d *drv)
static int fb_probe(struct device_d *dev)
{
- return 0;
+ struct fb_info *info = dev->priv;
+
+ dev_add_param(dev, "enable", fb_enable_set, NULL, 0);
+ dev_set_param(dev, "enable", "0");
+
+ if (info->num_modes && (info->mode_list != NULL) &&
+ (info->fbops->fb_activate_var != NULL)) {
+ dev_add_param(dev, "mode_name", fb_setup_mode, NULL, 0);
+ dev_set_param(dev, "mode_name", info->mode_list[0].name);
+ }
+
+ return devfs_create(&info->cdev);
}
static void fb_remove(struct device_d *dev)