summaryrefslogtreecommitdiff
path: root/drivers/thermal/power_allocator.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-10-02 17:21:25 +0300
committerDavid S. Miller <davem@davemloft.net>2015-10-02 17:21:25 +0300
commitf6d3125fa3c2f55ddf7cf69365c41089de6cfae6 (patch)
treeff2bcb135ebf090d7b383d55123b621f4590632c /drivers/thermal/power_allocator.c
parent2dc6a0303b89de4c92b44f5278d61b6b6c9c20eb (diff)
parent36f8dafe52b0d0726edd5102900e37192f1d3c65 (diff)
downloadlinux-f6d3125fa3c2f55ddf7cf69365c41089de6cfae6.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: net/dsa/slave.c net/dsa/slave.c simply had overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
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) /