From 486c0e17b7d1a4f8f057a97f2e48f715208f950d Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 7 Dec 2012 12:50:08 +0200 Subject: OMAPDSS: manage output-dssdev connection in output drivers We currently attach an output to a dssdev in the initialization code for dssdevices in display.c. This works, but doesn't quite make sense: an output entity represents (surprisingly) an output of DSS, which is managed by an output driver. The output driver also handles adding new dssdev's for that particular output. It makes more sense to make the output-dssdev connection in the output driver. This is also in line with common display framework. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/hdmi.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/video/omap2/dss/hdmi.c') diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 24a2eefb7e8..769d0828581 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c @@ -1026,9 +1026,18 @@ static void __init hdmi_probe_pdata(struct platform_device *pdev) return; } + r = omapdss_output_set_device(&hdmi.output, dssdev); + if (r) { + DSSERR("failed to connect output to new device: %s\n", + dssdev->name); + dss_put_device(dssdev); + return; + } + r = dss_add_device(dssdev); if (r) { DSSERR("device %s register failed: %d\n", dssdev->name, r); + omapdss_output_unset_device(&hdmi.output); hdmi_uninit_display(dssdev); dss_put_device(dssdev); return; -- cgit v1.2.3-18-g5258