aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-03-13 07:56:42 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-06-17 07:00:40 -0400
commit805cc2d19cce6bbd25fcefa24de7259508729e8a (patch)
tree3cdb6d0b3626597fb2919e4b5c565ca1a99bfad2
parentc6ca5b2201289995f70ee19c0eaf4b5f2ae09923 (diff)
OMAPDSS: add omap_dss_find_output()
Add a support function to find a DSS output by given name. This is used in later patches to link the panels to DSS outputs. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/omap2/dss/output.c13
-rw-r--r--include/video/omapdss.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/output.c b/drivers/video/omap2/dss/output.c
index 5214df63e0a9..3274628e0ea1 100644
--- a/drivers/video/omap2/dss/output.c
+++ b/drivers/video/omap2/dss/output.c
@@ -115,6 +115,19 @@ struct omap_dss_output *omap_dss_get_output(enum omap_dss_output_id id)
115} 115}
116EXPORT_SYMBOL(omap_dss_get_output); 116EXPORT_SYMBOL(omap_dss_get_output);
117 117
118struct omap_dss_output *omap_dss_find_output(const char *name)
119{
120 struct omap_dss_output *out;
121
122 list_for_each_entry(out, &output_list, list) {
123 if (strcmp(out->name, name) == 0)
124 return out;
125 }
126
127 return NULL;
128}
129EXPORT_SYMBOL(omap_dss_find_output);
130
118static const struct dss_mgr_ops *dss_mgr_ops; 131static const struct dss_mgr_ops *dss_mgr_ops;
119 132
120int dss_install_mgr_ops(const struct dss_mgr_ops *mgr_ops) 133int dss_install_mgr_ops(const struct dss_mgr_ops *mgr_ops)
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 6462f689a16d..0b4f718a63c8 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -780,6 +780,7 @@ int omap_dss_get_num_overlays(void);
780struct omap_overlay *omap_dss_get_overlay(int num); 780struct omap_overlay *omap_dss_get_overlay(int num);
781 781
782struct omap_dss_output *omap_dss_get_output(enum omap_dss_output_id id); 782struct omap_dss_output *omap_dss_get_output(enum omap_dss_output_id id);
783struct omap_dss_output *omap_dss_find_output(const char *name);
783int omapdss_output_set_device(struct omap_dss_output *out, 784int omapdss_output_set_device(struct omap_dss_output *out,
784 struct omap_dss_device *dssdev); 785 struct omap_dss_device *dssdev);
785int omapdss_output_unset_device(struct omap_dss_output *out); 786int omapdss_output_unset_device(struct omap_dss_output *out);