diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-10-03 10:59:12 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-15 18:50:33 -0400 |
commit | 2b3dc761cf2cfaf773ebec5c169494c4a670a419 (patch) | |
tree | fb72fb1c562b4621fcee5de0ad8be22c57624037 /drivers/cpufreq/dbx500-cpufreq.c | |
parent | af8c4cfabea88b441282dff26ef08d52a90d653c (diff) |
cpufreq: dbx500: use cpufreq_generic_init()
Use generic cpufreq_generic_init() routine instead of replicating the same code
here.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/dbx500-cpufreq.c')
-rw-r--r-- | drivers/cpufreq/dbx500-cpufreq.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/drivers/cpufreq/dbx500-cpufreq.c b/drivers/cpufreq/dbx500-cpufreq.c index ae1aa60b138a..a60f7693c18e 100644 --- a/drivers/cpufreq/dbx500-cpufreq.c +++ b/drivers/cpufreq/dbx500-cpufreq.c | |||
@@ -74,26 +74,7 @@ static unsigned int dbx500_cpufreq_getspeed(unsigned int cpu) | |||
74 | 74 | ||
75 | static int dbx500_cpufreq_init(struct cpufreq_policy *policy) | 75 | static int dbx500_cpufreq_init(struct cpufreq_policy *policy) |
76 | { | 76 | { |
77 | int res; | 77 | return cpufreq_generic_init(policy, freq_table, 20 * 1000); |
78 | |||
79 | /* get policy fields based on the table */ | ||
80 | res = cpufreq_table_validate_and_show(policy, freq_table); | ||
81 | if (res) { | ||
82 | pr_err("dbx500-cpufreq: Failed to read policy table\n"); | ||
83 | return res; | ||
84 | } | ||
85 | |||
86 | /* | ||
87 | * FIXME : Need to take time measurement across the target() | ||
88 | * function with no/some/all drivers in the notification | ||
89 | * list. | ||
90 | */ | ||
91 | policy->cpuinfo.transition_latency = 20 * 1000; /* in ns */ | ||
92 | |||
93 | /* policy sharing between dual CPUs */ | ||
94 | cpumask_setall(policy->cpus); | ||
95 | |||
96 | return 0; | ||
97 | } | 78 | } |
98 | 79 | ||
99 | static struct cpufreq_driver dbx500_cpufreq_driver = { | 80 | static struct cpufreq_driver dbx500_cpufreq_driver = { |