[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <2a0c90a15113539d3a9f3077e5ddd196e5d17301.1376329128.git.viresh.kumar@linaro.org>
Date: Mon, 12 Aug 2013 23:18:54 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: rjw@...k.pl
Cc: linaro-kernel@...ts.linaro.org, patches@...aro.org,
cpufreq@...r.kernel.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org,
Viresh Kumar <viresh.kumar@...aro.org>,
Dmitry Eremin-Solenikov <dbaryshkov@...il.com>
Subject: [PATCH 18/31] cpufreq: maple: Covert to light weight ->target() routine
This patch converts existing .target_old() to newly defined light weight
.target() routine for this driver.
CPUFreq core will call cpufreq_frequency_table_target() before calling this
routine and will pass index to it.
Cc: Dmitry Eremin-Solenikov <dbaryshkov@...il.com>
Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
---
drivers/cpufreq/maple-cpufreq.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/cpufreq/maple-cpufreq.c b/drivers/cpufreq/maple-cpufreq.c
index 7f84a66..10ec535 100644
--- a/drivers/cpufreq/maple-cpufreq.c
+++ b/drivers/cpufreq/maple-cpufreq.c
@@ -131,26 +131,18 @@ static int maple_scom_query_freq(void)
*/
static int maple_cpufreq_target(struct cpufreq_policy *policy,
- unsigned int target_freq, unsigned int relation)
+ unsigned int index)
{
- unsigned int newstate = 0;
struct cpufreq_freqs freqs;
int rc;
- if (cpufreq_frequency_table_target(policy, maple_cpu_freqs,
- target_freq, relation, &newstate))
- return -EINVAL;
-
- if (maple_pmode_cur == newstate)
- return 0;
-
mutex_lock(&maple_switch_mutex);
freqs.old = maple_cpu_freqs[maple_pmode_cur].frequency;
- freqs.new = maple_cpu_freqs[newstate].frequency;
+ freqs.new = maple_cpu_freqs[index].frequency;
cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
- rc = maple_scom_switch_freq(newstate);
+ rc = maple_scom_switch_freq(index);
cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
mutex_unlock(&maple_switch_mutex);
@@ -181,7 +173,7 @@ static struct cpufreq_driver maple_cpufreq_driver = {
.flags = CPUFREQ_CONST_LOOPS,
.init = maple_cpufreq_cpu_init,
.verify = cpufreq_generic_frequency_table_verify,
- .target_old = maple_cpufreq_target,
+ .target = maple_cpufreq_target,
.get = maple_cpufreq_get_speed,
.attr = cpufreq_generic_attr,
};
--
1.7.12.rc2.18.g61b472e
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists