thermal: cpu_cooling: find max level during device registration
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 4 Dec 2014 04:12:02 +0000 (09:42 +0530)
committerEduardo Valentin <edubezval@gmail.com>
Mon, 8 Dec 2014 18:07:10 +0000 (14:07 -0400)
commitdcc6c7fdef9e705b1300be22213fb23e3fd1994d
tree605b149f51bbde723335f84a37eb24894ac76fb2
parent521a2e5831704efef8aa826d6b22abef55650d59
thermal: cpu_cooling: find max level during device registration

CPU frequency tables don't update after the driver is registered and so we don't
need to iterate over them to find total number of states every time
cpufreq_get_max_state() is called. Do it once at boot time.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/cpu_cooling.c