aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-04-25 07:53:18 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-06-17 07:00:53 -0400
commit820caabf68e6ebddbb48cf1770338682cfa318c5 (patch)
treeeb59779ef3e95d7b42642e6182557a67897f1995 /drivers/video/omap2
parentb7328e14591fb532688db36ef894ac8c34948b4e (diff)
OMAPDSS: output: increase refcount in find_output funcs
Now that omap_dss_output has been combined into omap_dss_device, we can add ref counting for the relevant output functions also. This patch adds omap_dss_get_device() calls to the various find_output() style functions. This, of course, means that the users of those find_output functions need to do a omap_dss_put_device() after use. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r--drivers/video/omap2/dss/output.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/video/omap2/dss/output.c b/drivers/video/omap2/dss/output.c
index cc81fec1626f..9ad7d2175a7b 100644
--- a/drivers/video/omap2/dss/output.c
+++ b/drivers/video/omap2/dss/output.c
@@ -121,7 +121,7 @@ struct omap_dss_device *omap_dss_find_output(const char *name)
121 121
122 list_for_each_entry(out, &output_list, list) { 122 list_for_each_entry(out, &output_list, list) {
123 if (strcmp(out->name, name) == 0) 123 if (strcmp(out->name, name) == 0)
124 return out; 124 return omap_dss_get_device(out);
125 } 125 }
126 126
127 return NULL; 127 return NULL;
@@ -134,7 +134,7 @@ struct omap_dss_device *omap_dss_find_output_by_node(struct device_node *node)
134 134
135 list_for_each_entry(out, &output_list, list) { 135 list_for_each_entry(out, &output_list, list) {
136 if (out->dev->of_node == node) 136 if (out->dev->of_node == node)
137 return out; 137 return omap_dss_get_device(out);
138 } 138 }
139 139
140 return NULL; 140 return NULL;
@@ -143,20 +143,25 @@ EXPORT_SYMBOL(omap_dss_find_output_by_node);
143 143
144struct omap_dss_device *omapdss_find_output_from_display(struct omap_dss_device *dssdev) 144struct omap_dss_device *omapdss_find_output_from_display(struct omap_dss_device *dssdev)
145{ 145{
146 return dssdev->output; 146 return omap_dss_get_device(dssdev->output);
147} 147}
148EXPORT_SYMBOL(omapdss_find_output_from_display); 148EXPORT_SYMBOL(omapdss_find_output_from_display);
149 149
150struct omap_overlay_manager *omapdss_find_mgr_from_display(struct omap_dss_device *dssdev) 150struct omap_overlay_manager *omapdss_find_mgr_from_display(struct omap_dss_device *dssdev)
151{ 151{
152 struct omap_dss_device *out; 152 struct omap_dss_device *out;
153 struct omap_overlay_manager *mgr;
153 154
154 out = omapdss_find_output_from_display(dssdev); 155 out = omapdss_find_output_from_display(dssdev);
155 156
156 if (out == NULL) 157 if (out == NULL)
157 return NULL; 158 return NULL;
158 159
159 return out->manager; 160 mgr = out->manager;
161
162 omap_dss_put_device(out);
163
164 return mgr;
160} 165}
161EXPORT_SYMBOL(omapdss_find_mgr_from_display); 166EXPORT_SYMBOL(omapdss_find_mgr_from_display);
162 167