|
@@ -468,20 +468,14 @@ unsigned int acpi_cpufreq_fast_switch(struct cpufreq_policy *policy,
|
|
struct acpi_cpufreq_data *data = policy->driver_data;
|
|
struct acpi_cpufreq_data *data = policy->driver_data;
|
|
struct acpi_processor_performance *perf;
|
|
struct acpi_processor_performance *perf;
|
|
struct cpufreq_frequency_table *entry;
|
|
struct cpufreq_frequency_table *entry;
|
|
- unsigned int next_perf_state, next_freq, freq;
|
|
|
|
|
|
+ unsigned int next_perf_state, next_freq, index;
|
|
|
|
|
|
/*
|
|
/*
|
|
* Find the closest frequency above target_freq.
|
|
* Find the closest frequency above target_freq.
|
|
- *
|
|
|
|
- * The table is sorted in the reverse order with respect to the
|
|
|
|
- * frequency and all of the entries are valid (see the initialization).
|
|
|
|
*/
|
|
*/
|
|
- entry = policy->freq_table;
|
|
|
|
- do {
|
|
|
|
- entry++;
|
|
|
|
- freq = entry->frequency;
|
|
|
|
- } while (freq >= target_freq && freq != CPUFREQ_TABLE_END);
|
|
|
|
- entry--;
|
|
|
|
|
|
+ index = cpufreq_table_find_index_dl(policy, target_freq);
|
|
|
|
+
|
|
|
|
+ entry = &policy->freq_table[index];
|
|
next_freq = entry->frequency;
|
|
next_freq = entry->frequency;
|
|
next_perf_state = entry->driver_data;
|
|
next_perf_state = entry->driver_data;
|
|
|
|
|