cpufreq: powernow-k6: Fix incorrect comparison with max_multipler
authorSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Mon, 28 Apr 2014 18:54:27 +0000 (00:24 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 28 Apr 2014 23:22:53 +0000 (01:22 +0200)
commit237ede16ba5bcd4d6c612ea280518c48ca31986c
tree3936e8dcbf35e6317c49b212ac64a641800dd61c
parent7aa0557fae5ce26dddc877869c7ad934e71f30db
cpufreq: powernow-k6: Fix incorrect comparison with max_multipler

The value of 'max_multiplier' is meant to be used for comparison with
clock_ratio[index].driver_data, not the index itself! Fix the code in
powernow_k6_cpu_exit() that has this bug.

Also, while at it, make the for-loop condition look for CPUFREQ_TABLE_END,
instead of hard-coding the loop count to 8.

Reported-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/powernow-k6.c