mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
thermal: cooldev: fix cpucore cool devices driver issue [1/1]
PD#SWPL-3334 Problem: cpucore cool devices upper date type no match cpucore num set error Solution: modify cpucore upper num check Verify: w400 pass Change-Id: I83f829d31cab565d5ca3b892bb58a4a68b8f0f20 Signed-off-by: Huan Biao <huan.biao@amlogic.com>
This commit is contained in:
@@ -197,7 +197,7 @@ static int cpucore_notify_state(struct thermal_cooling_device *cdev,
|
||||
struct thermal_zone_device *tz,
|
||||
enum thermal_trip_type type)
|
||||
{
|
||||
unsigned long ins_upper;
|
||||
unsigned long ins_upper, target_upper = 0;
|
||||
long cur_state;
|
||||
long upper = -1;
|
||||
int i;
|
||||
@@ -206,8 +206,11 @@ static int cpucore_notify_state(struct thermal_cooling_device *cdev,
|
||||
case THERMAL_TRIP_HOT:
|
||||
for (i = 0; i < tz->trips; i++) {
|
||||
ins_upper = thermal_get_upper(tz, cdev, i);
|
||||
if (ins_upper > upper)
|
||||
upper = ins_upper;
|
||||
if (!IS_ERR_VALUE(ins_upper)
|
||||
&& (ins_upper >= target_upper)) {
|
||||
target_upper = ins_upper;
|
||||
upper = target_upper;
|
||||
}
|
||||
}
|
||||
cur_state = tz->hot_step;
|
||||
/* do not exceed levels */
|
||||
|
||||
Reference in New Issue
Block a user