aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2014-12-01 07:32:32 -0500
committerPhilipp Zabel <p.zabel@pengutronix.de>2015-02-23 05:42:23 -0500
commitf033c0bcc53675562200680f4cb4a86710d9fbae (patch)
tree0fceddf110155d73a39194e945b1c9b473a7e37f /drivers/video
parentc517d838eb7d07bbe9507871fab3931deccff539 (diff)
of: Decrement refcount of previous endpoint in of_graph_get_next_endpoint
Decrementing the reference count of the previous endpoint node allows to use the of_graph_get_next_endpoint function in a for_each_... style macro. All current users of this function that pass a non-NULL prev parameter (that is, soc_camera and imx-drm) are changed to not decrement the passed prev argument's refcount themselves. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/omap2/dss/omapdss-boot-init.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/video/fbdev/omap2/dss/omapdss-boot-init.c b/drivers/video/fbdev/omap2/dss/omapdss-boot-init.c
index 42b87f95267c..8b6f6d5fdd68 100644
--- a/drivers/video/fbdev/omap2/dss/omapdss-boot-init.c
+++ b/drivers/video/fbdev/omap2/dss/omapdss-boot-init.c
@@ -164,20 +164,15 @@ static void __init omapdss_walk_device(struct device_node *node, bool root)
164 164
165 pn = of_graph_get_remote_port_parent(n); 165 pn = of_graph_get_remote_port_parent(n);
166 166
167 if (!pn) { 167 if (!pn)
168 of_node_put(n);
169 continue; 168 continue;
170 }
171 169
172 if (!of_device_is_available(pn) || omapdss_list_contains(pn)) { 170 if (!of_device_is_available(pn) || omapdss_list_contains(pn)) {
173 of_node_put(pn); 171 of_node_put(pn);
174 of_node_put(n);
175 continue; 172 continue;
176 } 173 }
177 174
178 omapdss_walk_device(pn, false); 175 omapdss_walk_device(pn, false);
179
180 of_node_put(n);
181 } 176 }
182} 177}
183 178