* [PATCH 0/7] gpu: drm: remaining missing of_node_put issue fixes
@ 2016-07-05 2:04 ` Peter Chen
0 siblings, 0 replies; 31+ messages in thread
From: Peter Chen @ 2016-07-05 2:04 UTC (permalink / raw)
To: airlied; +Cc: dri-devel, linux-kernel, Peter Chen
Hi David,
This is remaining missing of_node_put issue fix for gpu/drm drivers, the
other fixes I sent yesterday. I think it may be easier for reviewing
using patch set for similar issue, thanks.
Peter Chen (7):
gpu: drm: rockchip_drm_drv: add missing of_node_put after calling
of_parse_phandle
gpu: drm: sti_compositor: add missing of_node_put after calling
of_parse_phandle
gpu: drm: sti_vdo: add missing of_node_put after calling
of_parse_phandle
gpu: drm: sti_hqvdp: add missing of_node_put after calling
of_parse_phandle
gpu: drm: sti_vtg: add missing of_node_put after calling
of_parse_phandle
gpu: drm: sun4i_drv: add missing of_node_put after calling
of_parse_phandle
gpu: drm: vc4_hdmi: add missing of_node_put after calling
of_parse_phandle
drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 1 +
drivers/gpu/drm/sti/sti_compositor.c | 2 ++
drivers/gpu/drm/sti/sti_dvo.c | 1 +
drivers/gpu/drm/sti/sti_hqvdp.c | 1 +
drivers/gpu/drm/sti/sti_vtg.c | 1 +
drivers/gpu/drm/sun4i/sun4i_drv.c | 1 +
drivers/gpu/drm/vc4/vc4_hdmi.c | 13 +++++++------
7 files changed, 14 insertions(+), 6 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 1/7] gpu: drm: rockchip_drm_drv: add missing of_node_put after calling of_parse_phandle
2016-07-05 2:04 ` Peter Chen
@ 2016-07-05 2:04 ` Peter Chen
-1 siblings, 0 replies; 31+ messages in thread
From: Peter Chen @ 2016-07-05 2:04 UTC (permalink / raw)
To: airlied; +Cc: dri-devel, linux-kernel, Peter Chen, Mark Yao, Heiko Stuebner
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.
Cc: Mark Yao <mark.yao@rock-chips.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
index a409d1f..935c5e0 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
@@ -518,6 +518,7 @@ static int rockchip_drm_platform_probe(struct platform_device *pdev)
is_support_iommu = false;
}
+ of_node_put(iommu);
component_match_add(dev, &match, compare_of, port->parent);
of_node_put(port);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 1/7] gpu: drm: rockchip_drm_drv: add missing of_node_put after calling of_parse_phandle
@ 2016-07-05 2:04 ` Peter Chen
0 siblings, 0 replies; 31+ messages in thread
From: Peter Chen @ 2016-07-05 2:04 UTC (permalink / raw)
To: airlied; +Cc: dri-devel, linux-kernel, Peter Chen, Mark Yao, Heiko Stuebner
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.
Cc: Mark Yao <mark.yao@rock-chips.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
index a409d1f..935c5e0 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
@@ -518,6 +518,7 @@ static int rockchip_drm_platform_probe(struct platform_device *pdev)
is_support_iommu = false;
}
+ of_node_put(iommu);
component_match_add(dev, &match, compare_of, port->parent);
of_node_put(port);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 2/7] gpu: drm: sti_compositor: add missing of_node_put after calling of_parse_phandle
2016-07-05 2:04 ` Peter Chen
@ 2016-07-05 2:04 ` Peter Chen
-1 siblings, 0 replies; 31+ messages in thread
From: Peter Chen @ 2016-07-05 2:04 UTC (permalink / raw)
To: airlied
Cc: dri-devel, linux-kernel, Peter Chen, Benjamin Gaignard, Vincent Abriou
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
drivers/gpu/drm/sti/sti_compositor.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/sti/sti_compositor.c b/drivers/gpu/drm/sti/sti_compositor.c
index 3d2fa3a..064de14 100644
--- a/drivers/gpu/drm/sti/sti_compositor.c
+++ b/drivers/gpu/drm/sti/sti_compositor.c
@@ -247,10 +247,12 @@ static int sti_compositor_probe(struct platform_device *pdev)
vtg_np = of_parse_phandle(pdev->dev.of_node, "st,vtg", 0);
if (vtg_np)
compo->vtg_main = of_vtg_find(vtg_np);
+ of_node_put(vtg_np);
vtg_np = of_parse_phandle(pdev->dev.of_node, "st,vtg", 1);
if (vtg_np)
compo->vtg_aux = of_vtg_find(vtg_np);
+ of_node_put(vtg_np);
platform_set_drvdata(pdev, compo);
--
1.9.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 2/7] gpu: drm: sti_compositor: add missing of_node_put after calling of_parse_phandle
@ 2016-07-05 2:04 ` Peter Chen
0 siblings, 0 replies; 31+ messages in thread
From: Peter Chen @ 2016-07-05 2:04 UTC (permalink / raw)
To: airlied
Cc: dri-devel, linux-kernel, Peter Chen, Benjamin Gaignard, Vincent Abriou
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
drivers/gpu/drm/sti/sti_compositor.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/sti/sti_compositor.c b/drivers/gpu/drm/sti/sti_compositor.c
index 3d2fa3a..064de14 100644
--- a/drivers/gpu/drm/sti/sti_compositor.c
+++ b/drivers/gpu/drm/sti/sti_compositor.c
@@ -247,10 +247,12 @@ static int sti_compositor_probe(struct platform_device *pdev)
vtg_np = of_parse_phandle(pdev->dev.of_node, "st,vtg", 0);
if (vtg_np)
compo->vtg_main = of_vtg_find(vtg_np);
+ of_node_put(vtg_np);
vtg_np = of_parse_phandle(pdev->dev.of_node, "st,vtg", 1);
if (vtg_np)
compo->vtg_aux = of_vtg_find(vtg_np);
+ of_node_put(vtg_np);
platform_set_drvdata(pdev, compo);
--
1.9.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 2/7] gpu: drm: sti_compositor: add missing of_node_put after calling of_parse_phandle
2016-07-05 2:04 ` Peter Chen
@ 2016-07-12 12:59 ` Benjamin Gaignard
-1 siblings, 0 replies; 31+ messages in thread
From: Benjamin Gaignard @ 2016-07-12 12:59 UTC (permalink / raw)
To: Peter Chen
Cc: David Airlie, dri-devel, Linux Kernel Mailing List, Vincent Abriou
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
2016-07-05 4:04 GMT+02:00 Peter Chen <peter.chen@nxp.com>:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> Cc: Vincent Abriou <vincent.abriou@st.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
> drivers/gpu/drm/sti/sti_compositor.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/sti/sti_compositor.c b/drivers/gpu/drm/sti/sti_compositor.c
> index 3d2fa3a..064de14 100644
> --- a/drivers/gpu/drm/sti/sti_compositor.c
> +++ b/drivers/gpu/drm/sti/sti_compositor.c
> @@ -247,10 +247,12 @@ static int sti_compositor_probe(struct platform_device *pdev)
> vtg_np = of_parse_phandle(pdev->dev.of_node, "st,vtg", 0);
> if (vtg_np)
> compo->vtg_main = of_vtg_find(vtg_np);
> + of_node_put(vtg_np);
>
> vtg_np = of_parse_phandle(pdev->dev.of_node, "st,vtg", 1);
> if (vtg_np)
> compo->vtg_aux = of_vtg_find(vtg_np);
> + of_node_put(vtg_np);
>
> platform_set_drvdata(pdev, compo);
>
> --
> 1.9.1
>
--
Benjamin Gaignard
Graphic Working Group
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 2/7] gpu: drm: sti_compositor: add missing of_node_put after calling of_parse_phandle
@ 2016-07-12 12:59 ` Benjamin Gaignard
0 siblings, 0 replies; 31+ messages in thread
From: Benjamin Gaignard @ 2016-07-12 12:59 UTC (permalink / raw)
To: Peter Chen; +Cc: Vincent Abriou, Linux Kernel Mailing List, dri-devel
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
2016-07-05 4:04 GMT+02:00 Peter Chen <peter.chen@nxp.com>:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> Cc: Vincent Abriou <vincent.abriou@st.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
> drivers/gpu/drm/sti/sti_compositor.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/sti/sti_compositor.c b/drivers/gpu/drm/sti/sti_compositor.c
> index 3d2fa3a..064de14 100644
> --- a/drivers/gpu/drm/sti/sti_compositor.c
> +++ b/drivers/gpu/drm/sti/sti_compositor.c
> @@ -247,10 +247,12 @@ static int sti_compositor_probe(struct platform_device *pdev)
> vtg_np = of_parse_phandle(pdev->dev.of_node, "st,vtg", 0);
> if (vtg_np)
> compo->vtg_main = of_vtg_find(vtg_np);
> + of_node_put(vtg_np);
>
> vtg_np = of_parse_phandle(pdev->dev.of_node, "st,vtg", 1);
> if (vtg_np)
> compo->vtg_aux = of_vtg_find(vtg_np);
> + of_node_put(vtg_np);
>
> platform_set_drvdata(pdev, compo);
>
> --
> 1.9.1
>
--
Benjamin Gaignard
Graphic Working Group
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 3/7] gpu: drm: sti_vdo: add missing of_node_put after calling of_parse_phandle
2016-07-05 2:04 ` Peter Chen
@ 2016-07-05 2:04 ` Peter Chen
-1 siblings, 0 replies; 31+ messages in thread
From: Peter Chen @ 2016-07-05 2:04 UTC (permalink / raw)
To: airlied
Cc: dri-devel, linux-kernel, Peter Chen, Benjamin Gaignard, Vincent Abriou
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
drivers/gpu/drm/sti/sti_dvo.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
index 25f7663..7e211a8 100644
--- a/drivers/gpu/drm/sti/sti_dvo.c
+++ b/drivers/gpu/drm/sti/sti_dvo.c
@@ -602,6 +602,7 @@ static int sti_dvo_probe(struct platform_device *pdev)
dvo->panel_node = of_parse_phandle(np, "sti,panel", 0);
if (!dvo->panel_node)
DRM_ERROR("No panel associated to the dvo output\n");
+ of_node_put(dvo->panel_node);
platform_set_drvdata(pdev, dvo);
--
1.9.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 3/7] gpu: drm: sti_vdo: add missing of_node_put after calling of_parse_phandle
@ 2016-07-05 2:04 ` Peter Chen
0 siblings, 0 replies; 31+ messages in thread
From: Peter Chen @ 2016-07-05 2:04 UTC (permalink / raw)
To: airlied
Cc: dri-devel, linux-kernel, Peter Chen, Benjamin Gaignard, Vincent Abriou
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
drivers/gpu/drm/sti/sti_dvo.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
index 25f7663..7e211a8 100644
--- a/drivers/gpu/drm/sti/sti_dvo.c
+++ b/drivers/gpu/drm/sti/sti_dvo.c
@@ -602,6 +602,7 @@ static int sti_dvo_probe(struct platform_device *pdev)
dvo->panel_node = of_parse_phandle(np, "sti,panel", 0);
if (!dvo->panel_node)
DRM_ERROR("No panel associated to the dvo output\n");
+ of_node_put(dvo->panel_node);
platform_set_drvdata(pdev, dvo);
--
1.9.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 3/7] gpu: drm: sti_vdo: add missing of_node_put after calling of_parse_phandle
2016-07-05 2:04 ` Peter Chen
@ 2016-07-12 12:59 ` Benjamin Gaignard
-1 siblings, 0 replies; 31+ messages in thread
From: Benjamin Gaignard @ 2016-07-12 12:59 UTC (permalink / raw)
To: Peter Chen
Cc: David Airlie, dri-devel, Linux Kernel Mailing List, Vincent Abriou
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
2016-07-05 4:04 GMT+02:00 Peter Chen <peter.chen@nxp.com>:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> Cc: Vincent Abriou <vincent.abriou@st.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
> drivers/gpu/drm/sti/sti_dvo.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
> index 25f7663..7e211a8 100644
> --- a/drivers/gpu/drm/sti/sti_dvo.c
> +++ b/drivers/gpu/drm/sti/sti_dvo.c
> @@ -602,6 +602,7 @@ static int sti_dvo_probe(struct platform_device *pdev)
> dvo->panel_node = of_parse_phandle(np, "sti,panel", 0);
> if (!dvo->panel_node)
> DRM_ERROR("No panel associated to the dvo output\n");
> + of_node_put(dvo->panel_node);
>
> platform_set_drvdata(pdev, dvo);
>
> --
> 1.9.1
>
--
Benjamin Gaignard
Graphic Working Group
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 3/7] gpu: drm: sti_vdo: add missing of_node_put after calling of_parse_phandle
@ 2016-07-12 12:59 ` Benjamin Gaignard
0 siblings, 0 replies; 31+ messages in thread
From: Benjamin Gaignard @ 2016-07-12 12:59 UTC (permalink / raw)
To: Peter Chen; +Cc: Vincent Abriou, Linux Kernel Mailing List, dri-devel
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
2016-07-05 4:04 GMT+02:00 Peter Chen <peter.chen@nxp.com>:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> Cc: Vincent Abriou <vincent.abriou@st.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
> drivers/gpu/drm/sti/sti_dvo.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
> index 25f7663..7e211a8 100644
> --- a/drivers/gpu/drm/sti/sti_dvo.c
> +++ b/drivers/gpu/drm/sti/sti_dvo.c
> @@ -602,6 +602,7 @@ static int sti_dvo_probe(struct platform_device *pdev)
> dvo->panel_node = of_parse_phandle(np, "sti,panel", 0);
> if (!dvo->panel_node)
> DRM_ERROR("No panel associated to the dvo output\n");
> + of_node_put(dvo->panel_node);
>
> platform_set_drvdata(pdev, dvo);
>
> --
> 1.9.1
>
--
Benjamin Gaignard
Graphic Working Group
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 4/7] gpu: drm: sti_hqvdp: add missing of_node_put after calling of_parse_phandle
2016-07-05 2:04 ` Peter Chen
@ 2016-07-05 2:04 ` Peter Chen
-1 siblings, 0 replies; 31+ messages in thread
From: Peter Chen @ 2016-07-05 2:04 UTC (permalink / raw)
To: airlied
Cc: dri-devel, linux-kernel, Peter Chen, Benjamin Gaignard, Vincent Abriou
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
drivers/gpu/drm/sti/sti_hqvdp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
index 1edec29..4f052fa 100644
--- a/drivers/gpu/drm/sti/sti_hqvdp.c
+++ b/drivers/gpu/drm/sti/sti_hqvdp.c
@@ -1346,6 +1346,7 @@ static int sti_hqvdp_probe(struct platform_device *pdev)
vtg_np = of_parse_phandle(pdev->dev.of_node, "st,vtg", 0);
if (vtg_np)
hqvdp->vtg = of_vtg_find(vtg_np);
+ of_node_put(vtg_np);
platform_set_drvdata(pdev, hqvdp);
--
1.9.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 4/7] gpu: drm: sti_hqvdp: add missing of_node_put after calling of_parse_phandle
@ 2016-07-05 2:04 ` Peter Chen
0 siblings, 0 replies; 31+ messages in thread
From: Peter Chen @ 2016-07-05 2:04 UTC (permalink / raw)
To: airlied
Cc: dri-devel, linux-kernel, Peter Chen, Benjamin Gaignard, Vincent Abriou
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
drivers/gpu/drm/sti/sti_hqvdp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
index 1edec29..4f052fa 100644
--- a/drivers/gpu/drm/sti/sti_hqvdp.c
+++ b/drivers/gpu/drm/sti/sti_hqvdp.c
@@ -1346,6 +1346,7 @@ static int sti_hqvdp_probe(struct platform_device *pdev)
vtg_np = of_parse_phandle(pdev->dev.of_node, "st,vtg", 0);
if (vtg_np)
hqvdp->vtg = of_vtg_find(vtg_np);
+ of_node_put(vtg_np);
platform_set_drvdata(pdev, hqvdp);
--
1.9.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 4/7] gpu: drm: sti_hqvdp: add missing of_node_put after calling of_parse_phandle
2016-07-05 2:04 ` Peter Chen
@ 2016-07-12 12:59 ` Benjamin Gaignard
-1 siblings, 0 replies; 31+ messages in thread
From: Benjamin Gaignard @ 2016-07-12 12:59 UTC (permalink / raw)
To: Peter Chen
Cc: David Airlie, dri-devel, Linux Kernel Mailing List, Vincent Abriou
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
2016-07-05 4:04 GMT+02:00 Peter Chen <peter.chen@nxp.com>:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> Cc: Vincent Abriou <vincent.abriou@st.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
> drivers/gpu/drm/sti/sti_hqvdp.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
> index 1edec29..4f052fa 100644
> --- a/drivers/gpu/drm/sti/sti_hqvdp.c
> +++ b/drivers/gpu/drm/sti/sti_hqvdp.c
> @@ -1346,6 +1346,7 @@ static int sti_hqvdp_probe(struct platform_device *pdev)
> vtg_np = of_parse_phandle(pdev->dev.of_node, "st,vtg", 0);
> if (vtg_np)
> hqvdp->vtg = of_vtg_find(vtg_np);
> + of_node_put(vtg_np);
>
> platform_set_drvdata(pdev, hqvdp);
>
> --
> 1.9.1
>
--
Benjamin Gaignard
Graphic Working Group
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 4/7] gpu: drm: sti_hqvdp: add missing of_node_put after calling of_parse_phandle
@ 2016-07-12 12:59 ` Benjamin Gaignard
0 siblings, 0 replies; 31+ messages in thread
From: Benjamin Gaignard @ 2016-07-12 12:59 UTC (permalink / raw)
To: Peter Chen; +Cc: Vincent Abriou, Linux Kernel Mailing List, dri-devel
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
2016-07-05 4:04 GMT+02:00 Peter Chen <peter.chen@nxp.com>:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> Cc: Vincent Abriou <vincent.abriou@st.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
> drivers/gpu/drm/sti/sti_hqvdp.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
> index 1edec29..4f052fa 100644
> --- a/drivers/gpu/drm/sti/sti_hqvdp.c
> +++ b/drivers/gpu/drm/sti/sti_hqvdp.c
> @@ -1346,6 +1346,7 @@ static int sti_hqvdp_probe(struct platform_device *pdev)
> vtg_np = of_parse_phandle(pdev->dev.of_node, "st,vtg", 0);
> if (vtg_np)
> hqvdp->vtg = of_vtg_find(vtg_np);
> + of_node_put(vtg_np);
>
> platform_set_drvdata(pdev, hqvdp);
>
> --
> 1.9.1
>
--
Benjamin Gaignard
Graphic Working Group
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 5/7] gpu: drm: sti_vtg: add missing of_node_put after calling of_parse_phandle
2016-07-05 2:04 ` Peter Chen
@ 2016-07-05 2:04 ` Peter Chen
-1 siblings, 0 replies; 31+ messages in thread
From: Peter Chen @ 2016-07-05 2:04 UTC (permalink / raw)
To: airlied
Cc: dri-devel, linux-kernel, Peter Chen, Benjamin Gaignard, Vincent Abriou
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
drivers/gpu/drm/sti/sti_vtg.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/sti/sti_vtg.c b/drivers/gpu/drm/sti/sti_vtg.c
index 6bf4ce4..0100c7c 100644
--- a/drivers/gpu/drm/sti/sti_vtg.c
+++ b/drivers/gpu/drm/sti/sti_vtg.c
@@ -432,6 +432,7 @@ static int vtg_probe(struct platform_device *pdev)
np = of_parse_phandle(pdev->dev.of_node, "st,slave", 0);
if (np) {
vtg->slave = of_vtg_find(np);
+ of_node_put(np);
if (!vtg->slave)
return -EPROBE_DEFER;
--
1.9.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 5/7] gpu: drm: sti_vtg: add missing of_node_put after calling of_parse_phandle
@ 2016-07-05 2:04 ` Peter Chen
0 siblings, 0 replies; 31+ messages in thread
From: Peter Chen @ 2016-07-05 2:04 UTC (permalink / raw)
To: airlied
Cc: dri-devel, linux-kernel, Peter Chen, Benjamin Gaignard, Vincent Abriou
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
drivers/gpu/drm/sti/sti_vtg.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/sti/sti_vtg.c b/drivers/gpu/drm/sti/sti_vtg.c
index 6bf4ce4..0100c7c 100644
--- a/drivers/gpu/drm/sti/sti_vtg.c
+++ b/drivers/gpu/drm/sti/sti_vtg.c
@@ -432,6 +432,7 @@ static int vtg_probe(struct platform_device *pdev)
np = of_parse_phandle(pdev->dev.of_node, "st,slave", 0);
if (np) {
vtg->slave = of_vtg_find(np);
+ of_node_put(np);
if (!vtg->slave)
return -EPROBE_DEFER;
--
1.9.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 5/7] gpu: drm: sti_vtg: add missing of_node_put after calling of_parse_phandle
2016-07-05 2:04 ` Peter Chen
@ 2016-07-12 12:59 ` Benjamin Gaignard
-1 siblings, 0 replies; 31+ messages in thread
From: Benjamin Gaignard @ 2016-07-12 12:59 UTC (permalink / raw)
To: Peter Chen
Cc: David Airlie, dri-devel, Linux Kernel Mailing List, Vincent Abriou
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
2016-07-05 4:04 GMT+02:00 Peter Chen <peter.chen@nxp.com>:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> Cc: Vincent Abriou <vincent.abriou@st.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
> drivers/gpu/drm/sti/sti_vtg.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/sti/sti_vtg.c b/drivers/gpu/drm/sti/sti_vtg.c
> index 6bf4ce4..0100c7c 100644
> --- a/drivers/gpu/drm/sti/sti_vtg.c
> +++ b/drivers/gpu/drm/sti/sti_vtg.c
> @@ -432,6 +432,7 @@ static int vtg_probe(struct platform_device *pdev)
> np = of_parse_phandle(pdev->dev.of_node, "st,slave", 0);
> if (np) {
> vtg->slave = of_vtg_find(np);
> + of_node_put(np);
>
> if (!vtg->slave)
> return -EPROBE_DEFER;
> --
> 1.9.1
>
--
Benjamin Gaignard
Graphic Working Group
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 5/7] gpu: drm: sti_vtg: add missing of_node_put after calling of_parse_phandle
@ 2016-07-12 12:59 ` Benjamin Gaignard
0 siblings, 0 replies; 31+ messages in thread
From: Benjamin Gaignard @ 2016-07-12 12:59 UTC (permalink / raw)
To: Peter Chen; +Cc: Vincent Abriou, Linux Kernel Mailing List, dri-devel
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
2016-07-05 4:04 GMT+02:00 Peter Chen <peter.chen@nxp.com>:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> Cc: Vincent Abriou <vincent.abriou@st.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
> drivers/gpu/drm/sti/sti_vtg.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/sti/sti_vtg.c b/drivers/gpu/drm/sti/sti_vtg.c
> index 6bf4ce4..0100c7c 100644
> --- a/drivers/gpu/drm/sti/sti_vtg.c
> +++ b/drivers/gpu/drm/sti/sti_vtg.c
> @@ -432,6 +432,7 @@ static int vtg_probe(struct platform_device *pdev)
> np = of_parse_phandle(pdev->dev.of_node, "st,slave", 0);
> if (np) {
> vtg->slave = of_vtg_find(np);
> + of_node_put(np);
>
> if (!vtg->slave)
> return -EPROBE_DEFER;
> --
> 1.9.1
>
--
Benjamin Gaignard
Graphic Working Group
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 6/7] gpu: drm: sun4i_drv: add missing of_node_put after calling of_parse_phandle
2016-07-05 2:04 ` Peter Chen
@ 2016-07-05 2:04 ` Peter Chen
-1 siblings, 0 replies; 31+ messages in thread
From: Peter Chen @ 2016-07-05 2:04 UTC (permalink / raw)
To: airlied; +Cc: dri-devel, linux-kernel, Peter Chen, Maxime Ripard, Chen-Yu Tsai
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
drivers/gpu/drm/sun4i/sun4i_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
index 76e922b..ca291ba 100644
--- a/drivers/gpu/drm/sun4i/sun4i_drv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
@@ -318,6 +318,7 @@ static int sun4i_drv_probe(struct platform_device *pdev)
count += sun4i_drv_add_endpoints(&pdev->dev, &match,
pipeline);
+ of_node_put(pipeline);
DRM_DEBUG_DRIVER("Queued %d outputs on pipeline %d\n",
count, i);
--
1.9.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 6/7] gpu: drm: sun4i_drv: add missing of_node_put after calling of_parse_phandle
@ 2016-07-05 2:04 ` Peter Chen
0 siblings, 0 replies; 31+ messages in thread
From: Peter Chen @ 2016-07-05 2:04 UTC (permalink / raw)
To: airlied; +Cc: dri-devel, linux-kernel, Peter Chen, Maxime Ripard, Chen-Yu Tsai
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
drivers/gpu/drm/sun4i/sun4i_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
index 76e922b..ca291ba 100644
--- a/drivers/gpu/drm/sun4i/sun4i_drv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
@@ -318,6 +318,7 @@ static int sun4i_drv_probe(struct platform_device *pdev)
count += sun4i_drv_add_endpoints(&pdev->dev, &match,
pipeline);
+ of_node_put(pipeline);
DRM_DEBUG_DRIVER("Queued %d outputs on pipeline %d\n",
count, i);
--
1.9.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 6/7] gpu: drm: sun4i_drv: add missing of_node_put after calling of_parse_phandle
2016-07-05 2:04 ` Peter Chen
@ 2016-07-05 7:20 ` Maxime Ripard
-1 siblings, 0 replies; 31+ messages in thread
From: Maxime Ripard @ 2016-07-05 7:20 UTC (permalink / raw)
To: Peter Chen; +Cc: airlied, dri-devel, linux-kernel, Chen-Yu Tsai
[-- Attachment #1: Type: text/plain, Size: 461 bytes --]
On Tue, Jul 05, 2016 at 10:04:53AM +0800, Peter Chen wrote:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
> Cc: Chen-Yu Tsai <wens@csie.org>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
Applied, thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 6/7] gpu: drm: sun4i_drv: add missing of_node_put after calling of_parse_phandle
@ 2016-07-05 7:20 ` Maxime Ripard
0 siblings, 0 replies; 31+ messages in thread
From: Maxime Ripard @ 2016-07-05 7:20 UTC (permalink / raw)
To: Peter Chen; +Cc: Chen-Yu Tsai, linux-kernel, dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 461 bytes --]
On Tue, Jul 05, 2016 at 10:04:53AM +0800, Peter Chen wrote:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
> Cc: Chen-Yu Tsai <wens@csie.org>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
Applied, thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 7/7] gpu: drm: vc4_hdmi: add missing of_node_put after calling of_parse_phandle
2016-07-05 2:04 ` Peter Chen
@ 2016-07-05 2:04 ` Peter Chen
-1 siblings, 0 replies; 31+ messages in thread
From: Peter Chen @ 2016-07-05 2:04 UTC (permalink / raw)
To: airlied; +Cc: dri-devel, linux-kernel, Peter Chen, Eric Anholt
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.
Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
drivers/gpu/drm/vc4/vc4_hdmi.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index fd2644d..26b6b06 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -465,12 +465,6 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
if (IS_ERR(hdmi->hd_regs))
return PTR_ERR(hdmi->hd_regs);
- ddc_node = of_parse_phandle(dev->of_node, "ddc", 0);
- if (!ddc_node) {
- DRM_ERROR("Failed to find ddc node in device tree\n");
- return -ENODEV;
- }
-
hdmi->pixel_clock = devm_clk_get(dev, "pixel");
if (IS_ERR(hdmi->pixel_clock)) {
DRM_ERROR("Failed to get pixel clock\n");
@@ -482,7 +476,14 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
return PTR_ERR(hdmi->hsm_clock);
}
+ ddc_node = of_parse_phandle(dev->of_node, "ddc", 0);
+ if (!ddc_node) {
+ DRM_ERROR("Failed to find ddc node in device tree\n");
+ return -ENODEV;
+ }
+
hdmi->ddc = of_find_i2c_adapter_by_node(ddc_node);
+ of_node_put(ddc_node);
if (!hdmi->ddc) {
DRM_DEBUG("Failed to get ddc i2c adapter by node\n");
return -EPROBE_DEFER;
--
1.9.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 7/7] gpu: drm: vc4_hdmi: add missing of_node_put after calling of_parse_phandle
@ 2016-07-05 2:04 ` Peter Chen
0 siblings, 0 replies; 31+ messages in thread
From: Peter Chen @ 2016-07-05 2:04 UTC (permalink / raw)
To: airlied; +Cc: dri-devel, linux-kernel, Peter Chen, Eric Anholt
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.
Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
drivers/gpu/drm/vc4/vc4_hdmi.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index fd2644d..26b6b06 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -465,12 +465,6 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
if (IS_ERR(hdmi->hd_regs))
return PTR_ERR(hdmi->hd_regs);
- ddc_node = of_parse_phandle(dev->of_node, "ddc", 0);
- if (!ddc_node) {
- DRM_ERROR("Failed to find ddc node in device tree\n");
- return -ENODEV;
- }
-
hdmi->pixel_clock = devm_clk_get(dev, "pixel");
if (IS_ERR(hdmi->pixel_clock)) {
DRM_ERROR("Failed to get pixel clock\n");
@@ -482,7 +476,14 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
return PTR_ERR(hdmi->hsm_clock);
}
+ ddc_node = of_parse_phandle(dev->of_node, "ddc", 0);
+ if (!ddc_node) {
+ DRM_ERROR("Failed to find ddc node in device tree\n");
+ return -ENODEV;
+ }
+
hdmi->ddc = of_find_i2c_adapter_by_node(ddc_node);
+ of_node_put(ddc_node);
if (!hdmi->ddc) {
DRM_DEBUG("Failed to get ddc i2c adapter by node\n");
return -EPROBE_DEFER;
--
1.9.1
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 7/7] gpu: drm: vc4_hdmi: add missing of_node_put after calling of_parse_phandle
2016-07-05 2:04 ` Peter Chen
@ 2016-07-05 16:23 ` Eric Anholt
-1 siblings, 0 replies; 31+ messages in thread
From: Eric Anholt @ 2016-07-05 16:23 UTC (permalink / raw)
To: Peter Chen, airlied; +Cc: dri-devel, linux-kernel, Peter Chen
[-- Attachment #1: Type: text/plain, Size: 1837 bytes --]
Peter Chen <peter.chen@nxp.com> writes:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Eric Anholt <eric@anholt.net>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
> drivers/gpu/drm/vc4/vc4_hdmi.c | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
> index fd2644d..26b6b06 100644
> --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
> +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
> @@ -465,12 +465,6 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
> if (IS_ERR(hdmi->hd_regs))
> return PTR_ERR(hdmi->hd_regs);
>
> - ddc_node = of_parse_phandle(dev->of_node, "ddc", 0);
> - if (!ddc_node) {
> - DRM_ERROR("Failed to find ddc node in device tree\n");
> - return -ENODEV;
> - }
> -
> hdmi->pixel_clock = devm_clk_get(dev, "pixel");
> if (IS_ERR(hdmi->pixel_clock)) {
> DRM_ERROR("Failed to get pixel clock\n");
> @@ -482,7 +476,14 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
> return PTR_ERR(hdmi->hsm_clock);
> }
>
> + ddc_node = of_parse_phandle(dev->of_node, "ddc", 0);
> + if (!ddc_node) {
> + DRM_ERROR("Failed to find ddc node in device tree\n");
> + return -ENODEV;
> + }
> +
> hdmi->ddc = of_find_i2c_adapter_by_node(ddc_node);
> + of_node_put(ddc_node);
> if (!hdmi->ddc) {
> DRM_DEBUG("Failed to get ddc i2c adapter by node\n");
> return -EPROBE_DEFER;
> --
Reviewed-by: Eric Anholt <eric@anholt.net>
It would be nice if we could just pass the phandle spec directly to the
i2c function. OF code always seems terribly verbose to me (and
error-prone in this exact way) because of the separate phandle lookup.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 7/7] gpu: drm: vc4_hdmi: add missing of_node_put after calling of_parse_phandle
@ 2016-07-05 16:23 ` Eric Anholt
0 siblings, 0 replies; 31+ messages in thread
From: Eric Anholt @ 2016-07-05 16:23 UTC (permalink / raw)
To: airlied; +Cc: Peter Chen, linux-kernel, dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 1837 bytes --]
Peter Chen <peter.chen@nxp.com> writes:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Eric Anholt <eric@anholt.net>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
> drivers/gpu/drm/vc4/vc4_hdmi.c | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
> index fd2644d..26b6b06 100644
> --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
> +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
> @@ -465,12 +465,6 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
> if (IS_ERR(hdmi->hd_regs))
> return PTR_ERR(hdmi->hd_regs);
>
> - ddc_node = of_parse_phandle(dev->of_node, "ddc", 0);
> - if (!ddc_node) {
> - DRM_ERROR("Failed to find ddc node in device tree\n");
> - return -ENODEV;
> - }
> -
> hdmi->pixel_clock = devm_clk_get(dev, "pixel");
> if (IS_ERR(hdmi->pixel_clock)) {
> DRM_ERROR("Failed to get pixel clock\n");
> @@ -482,7 +476,14 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
> return PTR_ERR(hdmi->hsm_clock);
> }
>
> + ddc_node = of_parse_phandle(dev->of_node, "ddc", 0);
> + if (!ddc_node) {
> + DRM_ERROR("Failed to find ddc node in device tree\n");
> + return -ENODEV;
> + }
> +
> hdmi->ddc = of_find_i2c_adapter_by_node(ddc_node);
> + of_node_put(ddc_node);
> if (!hdmi->ddc) {
> DRM_DEBUG("Failed to get ddc i2c adapter by node\n");
> return -EPROBE_DEFER;
> --
Reviewed-by: Eric Anholt <eric@anholt.net>
It would be nice if we could just pass the phandle spec directly to the
i2c function. OF code always seems terribly verbose to me (and
error-prone in this exact way) because of the separate phandle lookup.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 7/7] gpu: drm: vc4_hdmi: add missing of_node_put after calling of_parse_phandle
2016-07-05 16:23 ` Eric Anholt
(?)
@ 2016-07-12 13:47 ` Daniel Vetter
-1 siblings, 0 replies; 31+ messages in thread
From: Daniel Vetter @ 2016-07-12 13:47 UTC (permalink / raw)
To: Eric Anholt; +Cc: Peter Chen, airlied, linux-kernel, dri-devel
On Tue, Jul 05, 2016 at 09:23:02AM -0700, Eric Anholt wrote:
> Peter Chen <peter.chen@nxp.com> writes:
>
> > of_node_put needs to be called when the device node which is got
> > from of_parse_phandle has finished using.
> >
> > Cc: Eric Anholt <eric@anholt.net>
> > Signed-off-by: Peter Chen <peter.chen@nxp.com>
> > ---
> > drivers/gpu/drm/vc4/vc4_hdmi.c | 13 +++++++------
> > 1 file changed, 7 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
> > index fd2644d..26b6b06 100644
> > --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
> > +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
> > @@ -465,12 +465,6 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
> > if (IS_ERR(hdmi->hd_regs))
> > return PTR_ERR(hdmi->hd_regs);
> >
> > - ddc_node = of_parse_phandle(dev->of_node, "ddc", 0);
> > - if (!ddc_node) {
> > - DRM_ERROR("Failed to find ddc node in device tree\n");
> > - return -ENODEV;
> > - }
> > -
> > hdmi->pixel_clock = devm_clk_get(dev, "pixel");
> > if (IS_ERR(hdmi->pixel_clock)) {
> > DRM_ERROR("Failed to get pixel clock\n");
> > @@ -482,7 +476,14 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
> > return PTR_ERR(hdmi->hsm_clock);
> > }
> >
> > + ddc_node = of_parse_phandle(dev->of_node, "ddc", 0);
> > + if (!ddc_node) {
> > + DRM_ERROR("Failed to find ddc node in device tree\n");
> > + return -ENODEV;
> > + }
> > +
> > hdmi->ddc = of_find_i2c_adapter_by_node(ddc_node);
> > + of_node_put(ddc_node);
> > if (!hdmi->ddc) {
> > DRM_DEBUG("Failed to get ddc i2c adapter by node\n");
> > return -EPROBE_DEFER;
> > --
>
> Reviewed-by: Eric Anholt <eric@anholt.net>
>
> It would be nice if we could just pass the phandle spec directly to the
> i2c function. OF code always seems terribly verbose to me (and
> error-prone in this exact way) because of the separate phandle lookup.
Yeah, of_find_i2c_adapter_by_phandle would be neat. Either way, applied
all the other patches to drm-misc.
-Daniel
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 7/7] gpu: drm: vc4_hdmi: add missing of_node_put after calling of_parse_phandle
2016-07-05 2:04 ` Peter Chen
@ 2016-07-08 1:46 ` Eric Anholt
-1 siblings, 0 replies; 31+ messages in thread
From: Eric Anholt @ 2016-07-08 1:46 UTC (permalink / raw)
To: Peter Chen, airlied; +Cc: dri-devel, linux-kernel, Peter Chen
[-- Attachment #1: Type: text/plain, Size: 279 bytes --]
Peter Chen <peter.chen@nxp.com> writes:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Eric Anholt <eric@anholt.net>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
Applied this to drm-vc4-next. Thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
^ permalink raw reply [flat|nested] 31+ messages in thread