All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Chuhong Yuan <hslester96@gmail.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Kukjin Kim <kgene@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	linux-media@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: exynos4-is: add missed clk_disable_unprepare in remove
Date: Thu, 12 Dec 2019 11:39:38 +0100	[thread overview]
Message-ID: <29590e4f-cb9e-c9ac-608c-b7b72c308d25@xs4all.nl> (raw)
In-Reply-To: <20191104154942.8935-1-hslester96@gmail.com>

On 11/4/19 4:49 PM, Chuhong Yuan wrote:
> This driver forgets to disable and unprepare clock when remove.
> Add a call to clk_disable_unprepare to fix it.

I'd like an Ack from Samsung before I apply this. I see this in the probe() in fimc-lite.c:

       if (!pm_runtime_enabled(dev)) {
                ret = clk_prepare_enable(fimc->clock);
                if (ret < 0)
                        goto err_sd;
        }

So is it right to always call clk_disable_unprepare in the remove()?

I suspect it is correct, but I would like someone else to take a look as well.

Regards,

	Hans

> 
> Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
> ---
>  drivers/media/platform/exynos4-is/fimc-lite.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c
> index e87c6a09205b..6748bd96aada 100644
> --- a/drivers/media/platform/exynos4-is/fimc-lite.c
> +++ b/drivers/media/platform/exynos4-is/fimc-lite.c
> @@ -1614,6 +1614,7 @@ static int fimc_lite_remove(struct platform_device *pdev)
>  	struct fimc_lite *fimc = platform_get_drvdata(pdev);
>  	struct device *dev = &pdev->dev;
>  
> +	clk_disable_unprepare(fimc->clock);
>  	pm_runtime_disable(dev);
>  	pm_runtime_set_suspended(dev);
>  	fimc_lite_unregister_capture_subdev(fimc);
> 


WARNING: multiple messages have this Message-ID (diff)
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Chuhong Yuan <hslester96@gmail.com>
Cc: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Kukjin Kim <kgene@kernel.org>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-media@vger.kernel.org
Subject: Re: [PATCH] media: exynos4-is: add missed clk_disable_unprepare in remove
Date: Thu, 12 Dec 2019 11:39:38 +0100	[thread overview]
Message-ID: <29590e4f-cb9e-c9ac-608c-b7b72c308d25@xs4all.nl> (raw)
In-Reply-To: <20191104154942.8935-1-hslester96@gmail.com>

On 11/4/19 4:49 PM, Chuhong Yuan wrote:
> This driver forgets to disable and unprepare clock when remove.
> Add a call to clk_disable_unprepare to fix it.

I'd like an Ack from Samsung before I apply this. I see this in the probe() in fimc-lite.c:

       if (!pm_runtime_enabled(dev)) {
                ret = clk_prepare_enable(fimc->clock);
                if (ret < 0)
                        goto err_sd;
        }

So is it right to always call clk_disable_unprepare in the remove()?

I suspect it is correct, but I would like someone else to take a look as well.

Regards,

	Hans

> 
> Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
> ---
>  drivers/media/platform/exynos4-is/fimc-lite.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c
> index e87c6a09205b..6748bd96aada 100644
> --- a/drivers/media/platform/exynos4-is/fimc-lite.c
> +++ b/drivers/media/platform/exynos4-is/fimc-lite.c
> @@ -1614,6 +1614,7 @@ static int fimc_lite_remove(struct platform_device *pdev)
>  	struct fimc_lite *fimc = platform_get_drvdata(pdev);
>  	struct device *dev = &pdev->dev;
>  
> +	clk_disable_unprepare(fimc->clock);
>  	pm_runtime_disable(dev);
>  	pm_runtime_set_suspended(dev);
>  	fimc_lite_unregister_capture_subdev(fimc);
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-12-12 10:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-04 15:49 [PATCH] media: exynos4-is: add missed clk_disable_unprepare in remove Chuhong Yuan
2019-11-04 15:49 ` Chuhong Yuan
2019-12-12 10:39 ` Hans Verkuil [this message]
2019-12-12 10:39   ` Hans Verkuil
2019-12-12 11:03   ` Krzysztof Kozlowski
2019-12-12 11:03     ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=29590e4f-cb9e-c9ac-608c-b7b72c308d25@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=hslester96@gmail.com \
    --cc=kgene@kernel.org \
    --cc=krzk@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=s.nawrocki@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.