From: Eduardo Valentin Date: Wed, 13 Nov 2013 18:11:09 +0000 (-0400) Subject: thermal: fix cpu_cooling max_level behavior X-Git-Tag: v3.14-rc1~106^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c9573a40c1d34494419f32560f28c763c504d79;p=pandora-kernel.git thermal: fix cpu_cooling max_level behavior As per Documentation/thermal/sysfs-api.txt, max_level is an index, not a counter. Thus, in case a CPU has 3 valid frequencies, max_level is expected to be 2, for instance. The current code makes max_level == number of valid frequencies, which is bogus. This patch fix the cpu_cooling device by ranging max_level properly. Reported-by: Carlos Hernandez Signed-off-by: Eduardo Valentin Signed-off-by: Zhang Rui --- Reading git-diff-tree failed