diff mbox

[29/44] cpufreq: pcc: Use generic cpufreq routines

Message ID 707070e59966ed3982ee52b367991e0b175e0319.1376116345.git.viresh.kumar@linaro.org
State New
Headers show

Commit Message

Viresh Kumar Aug. 10, 2013, 6:44 a.m. UTC
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.

This patch uses these generic routines for this driver.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/pcc-cpufreq.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

Comments

Viresh Kumar Aug. 12, 2013, 6:08 a.m. UTC | #1
On 10 August 2013 12:14, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
> and .attr. So its better if we have generic routines for them which can be used
> by cpufreq drivers then.
>
> This patch uses these generic routines for this driver.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  drivers/cpufreq/pcc-cpufreq.c | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)

My patch was wrong.. It was based on the assumption that everybody who
had implemented a .target() also implements a frequency table and exposes
it.. And the generic routines I have exposed depend on that frequency table.
And this cpufreq driver doesn't expose that freq table...

And so this patch is dropped :(
diff mbox

Patch

diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c
index d81c4e5..90aa385 100644
--- a/drivers/cpufreq/pcc-cpufreq.c
+++ b/drivers/cpufreq/pcc-cpufreq.c
@@ -109,13 +109,6 @@  struct pcc_cpu {
 
 static struct pcc_cpu __percpu *pcc_cpu_info;
 
-static int pcc_cpufreq_verify(struct cpufreq_policy *policy)
-{
-	cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
-				     policy->cpuinfo.max_freq);
-	return 0;
-}
-
 static inline void pcc_cmd(void)
 {
 	u64 doorbell_value;
@@ -582,7 +575,7 @@  static int pcc_cpufreq_cpu_exit(struct cpufreq_policy *policy)
 static struct cpufreq_driver pcc_cpufreq_driver = {
 	.flags = CPUFREQ_CONST_LOOPS,
 	.get = pcc_get_freq,
-	.verify = pcc_cpufreq_verify,
+	.verify = cpufreq_generic_frequency_table_verify,
 	.target = pcc_cpufreq_target,
 	.init = pcc_cpufreq_cpu_init,
 	.exit = pcc_cpufreq_cpu_exit,