Thermal: exynos: fix cooling state translation

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Tested-by: Amit Daniel kachhap <amit.daniel@samsung.com>
This commit is contained in:
Zhang Rui
2013-02-08 14:52:06 +08:00
父節點 fc35b35cbe
當前提交 57df810693
共有 4 個文件被更改,包括 24 次插入23 次删除

查看文件

@@ -196,6 +196,17 @@ static int get_property(unsigned int cpu, unsigned long input,
return -EINVAL;
}
unsigned long cpufreq_cooling_get_level(unsigned int cpu, unsigned int freq)
{
unsigned int val;
if (get_property(cpu, (unsigned long)freq, &val, GET_LEVEL))
return THERMAL_CSTATE_INVALID;
return (unsigned long)val;
}
EXPORT_SYMBOL(cpufreq_cooling_get_level);
/**
* get_cpu_frequency - get the absolute value of frequency from level.
* @cpu: cpu for which frequency is fetched.