diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2014-12-01 07:32:32 -0500 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2015-02-23 05:42:23 -0500 |
commit | f033c0bcc53675562200680f4cb4a86710d9fbae (patch) | |
tree | 0fceddf110155d73a39194e945b1c9b473a7e37f /drivers/media | |
parent | c517d838eb7d07bbe9507871fab3931deccff539 (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/media')
-rw-r--r-- | drivers/media/platform/am437x/am437x-vpfe.c | 1 | ||||
-rw-r--r-- | drivers/media/platform/soc_camera/soc_camera.c | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c index 56a5cb0d2152..0d07fca756fe 100644 --- a/drivers/media/platform/am437x/am437x-vpfe.c +++ b/drivers/media/platform/am437x/am437x-vpfe.c | |||
@@ -2504,7 +2504,6 @@ vpfe_get_pdata(struct platform_device *pdev) | |||
2504 | GFP_KERNEL); | 2504 | GFP_KERNEL); |
2505 | pdata->asd[i]->match_type = V4L2_ASYNC_MATCH_OF; | 2505 | pdata->asd[i]->match_type = V4L2_ASYNC_MATCH_OF; |
2506 | pdata->asd[i]->match.of.node = rem; | 2506 | pdata->asd[i]->match.of.node = rem; |
2507 | of_node_put(endpoint); | ||
2508 | of_node_put(rem); | 2507 | of_node_put(rem); |
2509 | } | 2508 | } |
2510 | 2509 | ||
diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c index cee7b56f8404..f2a3d960b1a6 100644 --- a/drivers/media/platform/soc_camera/soc_camera.c +++ b/drivers/media/platform/soc_camera/soc_camera.c | |||
@@ -1694,7 +1694,6 @@ static void scan_of_host(struct soc_camera_host *ici) | |||
1694 | if (!i) | 1694 | if (!i) |
1695 | soc_of_bind(ici, epn, ren->parent); | 1695 | soc_of_bind(ici, epn, ren->parent); |
1696 | 1696 | ||
1697 | of_node_put(epn); | ||
1698 | of_node_put(ren); | 1697 | of_node_put(ren); |
1699 | 1698 | ||
1700 | if (i) { | 1699 | if (i) { |
@@ -1702,6 +1701,8 @@ static void scan_of_host(struct soc_camera_host *ici) | |||
1702 | break; | 1701 | break; |
1703 | } | 1702 | } |
1704 | } | 1703 | } |
1704 | |||
1705 | of_node_put(epn); | ||
1705 | } | 1706 | } |
1706 | 1707 | ||
1707 | #else | 1708 | #else |