Commit 160df0e8 authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[CPUFREQ] Export an array of acpi driver supported frequencies in sysfs

From Dominik.
parent b68ab931
...@@ -331,7 +331,7 @@ acpi_cpufreq_cpu_init ( ...@@ -331,7 +331,7 @@ acpi_cpufreq_cpu_init (
data->freq_table[i].frequency = CPUFREQ_TABLE_END; data->freq_table[i].frequency = CPUFREQ_TABLE_END;
} }
result = cpufreq_frequency_table_cpuinfo(policy, &data->freq_table[0]); result = cpufreq_frequency_table_cpuinfo(policy, data->freq_table);
if (result) { if (result) {
goto err_freqfree; goto err_freqfree;
} }
...@@ -346,6 +346,7 @@ acpi_cpufreq_cpu_init ( ...@@ -346,6 +346,7 @@ acpi_cpufreq_cpu_init (
(u32) data->acpi_data.states[i].power, (u32) data->acpi_data.states[i].power,
(u32) data->acpi_data.states[i].transition_latency); (u32) data->acpi_data.states[i].transition_latency);
cpufreq_frequency_table_get_attr(data->freq_table, policy->cpu);
return_VALUE(result); return_VALUE(result);
err_freqfree: err_freqfree:
...@@ -370,6 +371,7 @@ acpi_cpufreq_cpu_exit ( ...@@ -370,6 +371,7 @@ acpi_cpufreq_cpu_exit (
ACPI_FUNCTION_TRACE("acpi_cpufreq_cpu_exit"); ACPI_FUNCTION_TRACE("acpi_cpufreq_cpu_exit");
if (data) { if (data) {
cpufreq_frequency_table_put_attr(policy->cpu);
acpi_io_data[policy->cpu] = NULL; acpi_io_data[policy->cpu] = NULL;
acpi_processor_unregister_performance(&data->acpi_data, policy->cpu); acpi_processor_unregister_performance(&data->acpi_data, policy->cpu);
kfree(data); kfree(data);
...@@ -379,6 +381,11 @@ acpi_cpufreq_cpu_exit ( ...@@ -379,6 +381,11 @@ 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 = acpi_cpufreq_verify,
.target = acpi_cpufreq_target, .target = acpi_cpufreq_target,
...@@ -386,6 +393,7 @@ static struct cpufreq_driver acpi_cpufreq_driver = { ...@@ -386,6 +393,7 @@ static struct cpufreq_driver acpi_cpufreq_driver = {
.exit = acpi_cpufreq_cpu_exit, .exit = acpi_cpufreq_cpu_exit,
.name = "acpi-cpufreq", .name = "acpi-cpufreq",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.attr = acpi_cpufreq_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