summaryrefslogtreecommitdiff
path: root/drivers/thermal/power_allocator.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-10-08 10:52:18 +0200
committerIngo Molnar <mingo@kernel.org>2015-10-08 10:52:18 +0200
commitd3df65c198dc2f1deefb73c8427b04d1bdd1b18d (patch)
treef348c249146e2a1bbe2040ebecb0c529f5449b84 /drivers/thermal/power_allocator.c
parent712df65ccb63da08a484bf57c40b250dfd4103a7 (diff)
parent00e6fa5fe15c0eccc95a9d1afc4615e467ee8dc9 (diff)
Merge branch 'perf/urgent' into perf/core, before pulling new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
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,
switch_on_temp = 0;
temperature_threshold = control_temp - switch_on_temp;
+ /*
+ * estimate_pid_constants() tries to find appropriate default
+ * values for thermal zones that don't provide them. If a
+ * system integrator has configured a thermal zone with two
+ * passive trip points at the same temperature, that person
+ * hasn't put any effort to set up the thermal zone properly
+ * so just give up.
+ */
+ if (!temperature_threshold)
+ return;
if (!tz->tzp->k_po || force)
tz->tzp->k_po = int_to_frac(sustainable_power) /