From: Shawn Guo <shawn.guo@linaro.org>
To: Pramod Gurav <pramod.gurav@smartplayin.com>
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-pm@vger.kernel.org, "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Viresh Kumar <viresh.kumar@linaro.org>
Subject: Re: [PATCH 1/3] cpufreq: cpu0: Release clk and regulator in remove function
Date: Thu, 28 Aug 2014 13:30:03 +0800 [thread overview]
Message-ID: <20140828053002.GB23836@dragon> (raw)
In-Reply-To: <1409209212-18730-1-git-send-email-pramod.gurav@smartplayin.com>
On Thu, Aug 28, 2014 at 12:00:10AM -0700, Pramod Gurav wrote:
> This function releases clk and regulator in remove function for clean
> unloading.
>
> CC: Shawn Guo <shawn.guo@linaro.org>
> CC: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> CC: Viresh Kumar <viresh.kumar@linaro.org>
> Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
> ---
> drivers/cpufreq/cpufreq-cpu0.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
> index 0d2172b..e1574f8 100644
> --- a/drivers/cpufreq/cpufreq-cpu0.c
> +++ b/drivers/cpufreq/cpufreq-cpu0.c
> @@ -229,6 +229,8 @@ static int cpu0_cpufreq_remove(struct platform_device *pdev)
> cpufreq_cooling_unregister(cdev);
> cpufreq_unregister_driver(&cpu0_cpufreq_driver);
> dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table);
> + clk_put(cpu_clk);
> + regulator_put(cpu_reg);
cpu_reg is optional for the driver, so it's more logical to check the
availability before actually putting it?
Shawn
>
> return 0;
> }
> --
> 1.7.0.4
>
next prev parent reply other threads:[~2014-08-28 5:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-28 7:00 [PATCH 1/3] cpufreq: cpu0: Release clk and regulator in remove function Pramod Gurav
2014-08-28 5:30 ` Shawn Guo [this message]
2014-08-28 5:53 ` Viresh Kumar
2014-08-28 7:00 ` [PATCH 2/3] cpufreq: cpu0: Removes unnecessary IS_ERR check on clk Pramod Gurav
2014-08-28 5:31 ` Shawn Guo
2014-08-28 7:00 ` [PATCH 3/3] cpufreq: cpu0: Convert pr_ to dev_ as struct device is available Pramod Gurav
2014-08-28 6:15 ` Shawn Guo
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=20140828053002.GB23836@dragon \
--to=shawn.guo@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pramod.gurav@smartplayin.com \
--cc=rjw@rjwysocki.net \
--cc=viresh.kumar@linaro.org \
/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 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).