On 15 April 2014 02:37, Stratos Karafotis <strat...@semaphore.gr> wrote: > diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c > @@ -193,9 +191,9 @@ int cpufreq_frequency_table_get_index(struct > cpufreq_policy *policy, > return -ENOENT; > } > > - for (i = 0; table[i].frequency != CPUFREQ_TABLE_END; i++) { > - if (table[i].frequency == freq) > - return i; > + cpufreq_for_each_entry(pos, table) { > + if (pos->frequency == freq) > + return pos - table; > }
I asked you to do this in V1: use cpufreq_for_each_valid_entry() here as well. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/