OMAPDSS: add helpers to get mgr or output from display
Add two helper functions that can be used to find either the DSS output
or the overlay manager that is connected to the given display.
This hides how the output and the manager are actually connected, making
it easier to change the connections in the future.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
diff --git a/drivers/video/omap2/dss/manager-sysfs.c b/drivers/video/omap2/dss/manager-sysfs.c
index 9a2fb59..5104681 100644
--- a/drivers/video/omap2/dss/manager-sysfs.c
+++ b/drivers/video/omap2/dss/manager-sysfs.c
@@ -78,7 +78,9 @@
}
if (dssdev) {
- struct omap_dss_output *out = dssdev->output;
+ struct omap_dss_output *out;
+
+ out = omapdss_find_output_from_display(dssdev);
/*
* a registered device should have an output connected to it