summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-09-20 20:51:30 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-09-23 21:15:13 +0200
commit31a1e468737c10e945075061f3fdcc3cf6c33acf (patch)
tree924571670f496de57822fc098b51ca34a50dae57 /drivers/video
parented942bc08581b9c6fe6cba0ec8d7601e19d475a2 (diff)
downloadbarebox-31a1e468737c10e945075061f3fdcc3cf6c33acf.tar.gz
barebox-31a1e468737c10e945075061f3fdcc3cf6c33acf.tar.xz
fb: add it's own bus for fb devices
This is need for oftree device probing Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fb.c31
1 files changed, 27 insertions, 4 deletions
diff --git a/drivers/video/fb.c b/drivers/video/fb.c
index d885570b24..ae6ff74cab 100644
--- a/drivers/video/fb.c
+++ b/drivers/video/fb.c
@@ -125,6 +125,7 @@ int register_framebuffer(struct fb_info *info)
sprintf(dev->name, "fb");
+ 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");
@@ -160,19 +161,41 @@ static void fb_info(struct device_d *dev)
printf("\n");
}
-static int fb_probe(struct device_d *hw_dev)
+static struct driver_d fb_driver = {
+ .name = "fb",
+ .info = fb_info,
+};
+
+static int fb_match(struct device_d *dev, struct driver_d *drv)
{
return 0;
}
-static struct driver_d fb_driver = {
- .name = "fb",
+static int fb_probe(struct device_d *dev)
+{
+ return 0;
+}
+
+static void fb_remove(struct device_d *dev)
+{
+}
+
+struct bus_type fb_bus = {
+ .name = "fb",
+ .match = fb_match,
.probe = fb_probe,
- .info = fb_info,
+ .remove = fb_remove,
};
+static int fb_bus_init(void)
+{
+ return bus_register(&fb_bus);
+}
+pure_initcall(fb_bus_init);
+
static int fb_init_driver(void)
{
+ fb_driver.bus = &fb_bus;
register_driver(&fb_driver);
return 0;
}