diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-10-03 20:28:29 +0530 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-16 00:50:28 +0200 |
commit | 8e08cf03a46299bc1ebf9dbd2ebe7d3093f89541 (patch) | |
tree | a8b1aec5c5f02ee2049d7702c4d6266e1cfa61a8 | |
parent | 3be1394a6873496c36d99899fb6ba76ff03a2e96 (diff) | |
download | linux-stable-8e08cf03a46299bc1ebf9dbd2ebe7d3093f89541.tar.gz linux-stable-8e08cf03a46299bc1ebf9dbd2ebe7d3093f89541.tar.bz2 linux-stable-8e08cf03a46299bc1ebf9dbd2ebe7d3093f89541.zip |
cpufreq: tegra: Use generic cpufreq routines
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 in the Tegra driver.
Cc: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/cpufreq/tegra-cpufreq.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/cpufreq/tegra-cpufreq.c b/drivers/cpufreq/tegra-cpufreq.c index e0140779b864..c36a8e7036af 100644 --- a/drivers/cpufreq/tegra-cpufreq.c +++ b/drivers/cpufreq/tegra-cpufreq.c @@ -51,11 +51,6 @@ static unsigned long target_cpu_speed[NUM_CPUS]; static DEFINE_MUTEX(tegra_cpu_lock); static bool is_suspended; -static int tegra_verify_speed(struct cpufreq_policy *policy) -{ - return cpufreq_frequency_table_verify(policy, freq_table); -} - static unsigned int tegra_getspeed(unsigned int cpu) { unsigned long rate; @@ -237,19 +232,14 @@ static int tegra_cpu_exit(struct cpufreq_policy *policy) return 0; } -static struct freq_attr *tegra_cpufreq_attr[] = { - &cpufreq_freq_attr_scaling_available_freqs, - NULL, -}; - static struct cpufreq_driver tegra_cpufreq_driver = { - .verify = tegra_verify_speed, + .verify = cpufreq_generic_frequency_table_verify, .target = tegra_target, .get = tegra_getspeed, .init = tegra_cpu_init, .exit = tegra_cpu_exit, .name = "tegra", - .attr = tegra_cpufreq_attr, + .attr = cpufreq_generic_attr, }; static int __init tegra_cpufreq_init(void) |