summaryrefslogtreecommitdiffstats
path: root/drivers/video/stm.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-05-26 15:06:53 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-05-30 12:18:27 +0200
commit73b0d228e5b00365e7289e9c258acb8de3f716b3 (patch)
treeb17c82b3a4f33d52fdd26c52086e1fa7eaac97a3 /drivers/video/stm.c
parent4a4f2f20b8873224983ab9b78173f9bc0564fa33 (diff)
downloadbarebox-73b0d228e5b00365e7289e9c258acb8de3f716b3.tar.gz
barebox-73b0d228e5b00365e7289e9c258acb8de3f716b3.tar.xz
driver: Attach info callback to device, not to driver
Since the info is device specific and not driver specific, attach the callback to the device. This makes it possible to have a info callback for a device which does not have a driver attached. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/video/stm.c')
-rw-r--r--drivers/video/stm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/stm.c b/drivers/video/stm.c
index cefdef2ab5..606e39a253 100644
--- a/drivers/video/stm.c
+++ b/drivers/video/stm.c
@@ -502,6 +502,8 @@ static int stmfb_probe(struct device_d *hw_dev)
else
fbi.info.bits_per_pixel = 16;
+ hw_dev->info = stmfb_info;
+
ret = register_framebuffer(&fbi.info);
if (ret != 0) {
dev_err(hw_dev, "Failed to register framebuffer\n");
@@ -514,7 +516,6 @@ static int stmfb_probe(struct device_d *hw_dev)
static struct driver_d stmfb_driver = {
.name = "stmfb",
.probe = stmfb_probe,
- .info = stmfb_info,
};
device_platform_driver(stmfb_driver);