* [PATCH] drm/tilcdc: add missing clk_put in tilcdc_unload()
@ 2014-11-19 14:13 Julien CHAUVEAU
2014-11-19 14:32 ` Felipe Balbi
2014-11-19 14:56 ` [PATCH v2] " Julien CHAUVEAU
0 siblings, 2 replies; 3+ messages in thread
From: Julien CHAUVEAU @ 2014-11-19 14:13 UTC (permalink / raw)
To: David Airlie, Rob Clark, open list:DRM DRIVERS, open list; +Cc: Julien CHAUVEAU
We need to call clk_put on display clock, in the same way as functional clock.
Signed-off-by: Julien CHAUVEAU <julien.chauveau@neo-technologies.fr>
---
drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 79a34cb..ccc1cdb 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -136,6 +136,9 @@ static int tilcdc_unload(struct drm_device *dev)
CPUFREQ_TRANSITION_NOTIFIER);
#endif
+ if (priv->disp_clk)
+ clk_put(priv->disp_clk);
+
if (priv->clk)
clk_put(priv->clk);
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/tilcdc: add missing clk_put in tilcdc_unload()
2014-11-19 14:13 [PATCH] drm/tilcdc: add missing clk_put in tilcdc_unload() Julien CHAUVEAU
@ 2014-11-19 14:32 ` Felipe Balbi
2014-11-19 14:56 ` [PATCH v2] " Julien CHAUVEAU
1 sibling, 0 replies; 3+ messages in thread
From: Felipe Balbi @ 2014-11-19 14:32 UTC (permalink / raw)
To: Julien CHAUVEAU; +Cc: David Airlie, Rob Clark, open list:DRM DRIVERS, open list
[-- Attachment #1: Type: text/plain, Size: 871 bytes --]
On Wed, Nov 19, 2014 at 03:13:20PM +0100, Julien CHAUVEAU wrote:
> We need to call clk_put on display clock, in the same way as functional clock.
>
> Signed-off-by: Julien CHAUVEAU <julien.chauveau@neo-technologies.fr>
> ---
> drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> index 79a34cb..ccc1cdb 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> @@ -136,6 +136,9 @@ static int tilcdc_unload(struct drm_device *dev)
> CPUFREQ_TRANSITION_NOTIFIER);
> #endif
>
> + if (priv->disp_clk)
> + clk_put(priv->disp_clk);
> +
> if (priv->clk)
> clk_put(priv->clk);
we should actually remove the priv->$clk check. clk_put() is safe
against NULL pointers.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2] drm/tilcdc: add missing clk_put in tilcdc_unload()
2014-11-19 14:13 [PATCH] drm/tilcdc: add missing clk_put in tilcdc_unload() Julien CHAUVEAU
2014-11-19 14:32 ` Felipe Balbi
@ 2014-11-19 14:56 ` Julien CHAUVEAU
1 sibling, 0 replies; 3+ messages in thread
From: Julien CHAUVEAU @ 2014-11-19 14:56 UTC (permalink / raw)
To: David Airlie, Rob Clark, open list:DRM DRIVERS, open list; +Cc: Julien CHAUVEAU
We need to call clk_put on display clock, in the same way as functional clock.
Also remove the check for priv->clk, since clk_put() is safe against NULL pointers.
Signed-off-by: Julien CHAUVEAU <julien.chauveau@neo-technologies.fr>
---
Changes since v1:
- remove the check for priv->clk, as suggested by Felipe Balbi
drivers/gpu/drm/tilcdc/tilcdc_drv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 79a34cb..b0c9687 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -136,8 +136,8 @@ static int tilcdc_unload(struct drm_device *dev)
CPUFREQ_TRANSITION_NOTIFIER);
#endif
- if (priv->clk)
- clk_put(priv->clk);
+ clk_put(priv->disp_clk);
+ clk_put(priv->clk);
if (priv->mmio)
iounmap(priv->mmio);
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-19 15:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-19 14:13 [PATCH] drm/tilcdc: add missing clk_put in tilcdc_unload() Julien CHAUVEAU
2014-11-19 14:32 ` Felipe Balbi
2014-11-19 14:56 ` [PATCH v2] " Julien CHAUVEAU
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).