aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal/power_allocator.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/thermal/power_allocator.c')
-rw-r--r--drivers/thermal/power_allocator.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/thermal/power_allocator.c b/drivers/thermal/power_allocator.c
index 7ff96270c933..e570ff084add 100644
--- a/drivers/thermal/power_allocator.c
+++ b/drivers/thermal/power_allocator.c
@@ -144,6 +144,16 @@ static void estimate_pid_constants(struct thermal_zone_device *tz,
144 switch_on_temp = 0; 144 switch_on_temp = 0;
145 145
146 temperature_threshold = control_temp - switch_on_temp; 146 temperature_threshold = control_temp - switch_on_temp;
147 /*
148 * estimate_pid_constants() tries to find appropriate default
149 * values for thermal zones that don't provide them. If a
150 * system integrator has configured a thermal zone with two
151 * passive trip points at the same temperature, that person
152 * hasn't put any effort to set up the thermal zone properly
153 * so just give up.
154 */
155 if (!temperature_threshold)
156 return;
147 157
148 if (!tz->tzp->k_po || force) 158 if (!tz->tzp->k_po || force)
149 tz->tzp->k_po = int_to_frac(sustainable_power) / 159 tz->tzp->k_po = int_to_frac(sustainable_power) /