Commit 59b2413b authored by Viresh Kumar's avatar Viresh Kumar Committed by Rafael J. Wysocki

cpufreq: ia64-acpi: 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 ia64-acpi driver.

Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent eea6181e
...@@ -247,22 +247,6 @@ acpi_cpufreq_target ( ...@@ -247,22 +247,6 @@ acpi_cpufreq_target (
} }
static int
acpi_cpufreq_verify (
struct cpufreq_policy *policy)
{
unsigned int result = 0;
struct cpufreq_acpi_io *data = acpi_io_data[policy->cpu];
pr_debug("acpi_cpufreq_verify\n");
result = cpufreq_frequency_table_verify(policy,
data->freq_table);
return (result);
}
static int static int
acpi_cpufreq_cpu_init ( acpi_cpufreq_cpu_init (
struct cpufreq_policy *policy) struct cpufreq_policy *policy)
...@@ -394,20 +378,14 @@ acpi_cpufreq_cpu_exit ( ...@@ -394,20 +378,14 @@ acpi_cpufreq_cpu_exit (
} }
static struct freq_attr* acpi_cpufreq_attr[] = {
&cpufreq_freq_attr_scaling_available_freqs,
NULL,
};
static struct cpufreq_driver acpi_cpufreq_driver = { static struct cpufreq_driver acpi_cpufreq_driver = {
.verify = acpi_cpufreq_verify, .verify = cpufreq_generic_frequency_table_verify,
.target = acpi_cpufreq_target, .target = acpi_cpufreq_target,
.get = acpi_cpufreq_get, .get = acpi_cpufreq_get,
.init = acpi_cpufreq_cpu_init, .init = acpi_cpufreq_cpu_init,
.exit = acpi_cpufreq_cpu_exit, .exit = acpi_cpufreq_cpu_exit,
.name = "acpi-cpufreq", .name = "acpi-cpufreq",
.attr = acpi_cpufreq_attr, .attr = cpufreq_generic_attr,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment