Skip to content
Commit 1c9573a4 authored by Eduardo Valentin's avatar Eduardo Valentin Committed by Zhang Rui
Browse files

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: default avatarCarlos Hernandez <ceh@ti.com>
Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
parent 06475b55
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment