* [PATCH V3 1/2] cpufreq: qoriq: Remove __exit macro from .exit callback
@ 2016-04-19 9:00 Jia Hongtao
2016-04-19 9:00 ` [PATCH V3 2/2] cpufreq: qoriq: Fix cooling device registration issue during suspend Jia Hongtao
2016-04-19 9:11 ` [PATCH V3 1/2] cpufreq: qoriq: Remove __exit macro from .exit callback Viresh Kumar
0 siblings, 2 replies; 5+ messages in thread
From: Jia Hongtao @ 2016-04-19 9:00 UTC (permalink / raw)
To: viresh.kumar, linux-pm
Cc: linuxppc-dev, scott.wood, yuantian.tang, hongtao.jia
.exit callback (qoriq_cpufreq_cpu_exit()) is also used during suspend.
So __exit macro should be removed or the function will be discarded.
Signed-off-by: Jia Hongtao <hongtao.jia@nxp.com>
---
drivers/cpufreq/qoriq-cpufreq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c
index b23e525..3a3fe39 100644
--- a/drivers/cpufreq/qoriq-cpufreq.c
+++ b/drivers/cpufreq/qoriq-cpufreq.c
@@ -301,7 +301,7 @@ err_np:
return -ENODEV;
}
-static int __exit qoriq_cpufreq_cpu_exit(struct cpufreq_policy *policy)
+static int qoriq_cpufreq_cpu_exit(struct cpufreq_policy *policy)
{
struct cpu_data *data = policy->driver_data;
@@ -348,7 +348,7 @@ static struct cpufreq_driver qoriq_cpufreq_driver = {
.name = "qoriq_cpufreq",
.flags = CPUFREQ_CONST_LOOPS,
.init = qoriq_cpufreq_cpu_init,
- .exit = __exit_p(qoriq_cpufreq_cpu_exit),
+ .exit = qoriq_cpufreq_cpu_exit,
.verify = cpufreq_generic_frequency_table_verify,
.target_index = qoriq_cpufreq_target,
.get = cpufreq_generic_get,
--
2.1.0.27.g96db324
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH V3 2/2] cpufreq: qoriq: Fix cooling device registration issue during suspend
2016-04-19 9:00 [PATCH V3 1/2] cpufreq: qoriq: Remove __exit macro from .exit callback Jia Hongtao
@ 2016-04-19 9:00 ` Jia Hongtao
2016-04-19 9:12 ` Viresh Kumar
2016-04-19 9:11 ` [PATCH V3 1/2] cpufreq: qoriq: Remove __exit macro from .exit callback Viresh Kumar
1 sibling, 1 reply; 5+ messages in thread
From: Jia Hongtao @ 2016-04-19 9:00 UTC (permalink / raw)
To: viresh.kumar, linux-pm
Cc: linuxppc-dev, scott.wood, yuantian.tang, hongtao.jia
Cooling device is registered by ready callback. It's also invoked while
system resuming from sleep (Enabling non-boot cpus). Thus cooling device
may be multiple registered. Matchable unregistration is added to exit
callback to fix this issue.
Signed-off-by: Jia Hongtao <hongtao.jia@nxp.com>
---
drivers/cpufreq/qoriq-cpufreq.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c
index 3a3fe39..0b85f90 100644
--- a/drivers/cpufreq/qoriq-cpufreq.c
+++ b/drivers/cpufreq/qoriq-cpufreq.c
@@ -305,6 +305,7 @@ static int qoriq_cpufreq_cpu_exit(struct cpufreq_policy *policy)
{
struct cpu_data *data = policy->driver_data;
+ cpufreq_cooling_unregister(data->cdev);
kfree(data->pclk);
kfree(data->table);
kfree(data);
--
2.1.0.27.g96db324
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH V3 1/2] cpufreq: qoriq: Remove __exit macro from .exit callback
2016-04-19 9:00 [PATCH V3 1/2] cpufreq: qoriq: Remove __exit macro from .exit callback Jia Hongtao
2016-04-19 9:00 ` [PATCH V3 2/2] cpufreq: qoriq: Fix cooling device registration issue during suspend Jia Hongtao
@ 2016-04-19 9:11 ` Viresh Kumar
2016-04-26 0:03 ` Rafael J. Wysocki
1 sibling, 1 reply; 5+ messages in thread
From: Viresh Kumar @ 2016-04-19 9:11 UTC (permalink / raw)
To: Jia Hongtao; +Cc: linux-pm, linuxppc-dev, scott.wood, yuantian.tang
On 19-04-16, 17:00, Jia Hongtao wrote:
> .exit callback (qoriq_cpufreq_cpu_exit()) is also used during suspend.
> So __exit macro should be removed or the function will be discarded.
>
> Signed-off-by: Jia Hongtao <hongtao.jia@nxp.com>
> ---
> drivers/cpufreq/qoriq-cpufreq.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V3 2/2] cpufreq: qoriq: Fix cooling device registration issue during suspend
2016-04-19 9:00 ` [PATCH V3 2/2] cpufreq: qoriq: Fix cooling device registration issue during suspend Jia Hongtao
@ 2016-04-19 9:12 ` Viresh Kumar
0 siblings, 0 replies; 5+ messages in thread
From: Viresh Kumar @ 2016-04-19 9:12 UTC (permalink / raw)
To: Jia Hongtao; +Cc: linux-pm, linuxppc-dev, scott.wood, yuantian.tang
On 19-04-16, 17:00, Jia Hongtao wrote:
> Cooling device is registered by ready callback. It's also invoked while
> system resuming from sleep (Enabling non-boot cpus). Thus cooling device
> may be multiple registered. Matchable unregistration is added to exit
> callback to fix this issue.
>
> Signed-off-by: Jia Hongtao <hongtao.jia@nxp.com>
> ---
> drivers/cpufreq/qoriq-cpufreq.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c
> index 3a3fe39..0b85f90 100644
> --- a/drivers/cpufreq/qoriq-cpufreq.c
> +++ b/drivers/cpufreq/qoriq-cpufreq.c
> @@ -305,6 +305,7 @@ static int qoriq_cpufreq_cpu_exit(struct cpufreq_policy *policy)
> {
> struct cpu_data *data = policy->driver_data;
>
> + cpufreq_cooling_unregister(data->cdev);
> kfree(data->pclk);
> kfree(data->table);
> kfree(data);
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V3 1/2] cpufreq: qoriq: Remove __exit macro from .exit callback
2016-04-19 9:11 ` [PATCH V3 1/2] cpufreq: qoriq: Remove __exit macro from .exit callback Viresh Kumar
@ 2016-04-26 0:03 ` Rafael J. Wysocki
0 siblings, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2016-04-26 0:03 UTC (permalink / raw)
To: Viresh Kumar, Jia Hongtao
Cc: linux-pm, linuxppc-dev, scott.wood, yuantian.tang
On Tuesday, April 19, 2016 02:41:51 PM Viresh Kumar wrote:
> On 19-04-16, 17:00, Jia Hongtao wrote:
> > .exit callback (qoriq_cpufreq_cpu_exit()) is also used during suspend.
> > So __exit macro should be removed or the function will be discarded.
> >
> > Signed-off-by: Jia Hongtao <hongtao.jia@nxp.com>
> > ---
> > drivers/cpufreq/qoriq-cpufreq.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Applied, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-04-26 0:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-19 9:00 [PATCH V3 1/2] cpufreq: qoriq: Remove __exit macro from .exit callback Jia Hongtao
2016-04-19 9:00 ` [PATCH V3 2/2] cpufreq: qoriq: Fix cooling device registration issue during suspend Jia Hongtao
2016-04-19 9:12 ` Viresh Kumar
2016-04-19 9:11 ` [PATCH V3 1/2] cpufreq: qoriq: Remove __exit macro from .exit callback Viresh Kumar
2016-04-26 0:03 ` Rafael J. Wysocki
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).