mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Thermal: update thermal zone device after setting emul_temp
@ 2014-01-02  7:47 Lan Tianyu
  0 siblings, 0 replies; only message in thread
From: Lan Tianyu @ 2014-01-02  7:47 UTC (permalink / raw)
  To: rui.zhang, eduardo.valentin; +Cc: Lan Tianyu, linux-pm, linux-kernel

This patch is to update thermal zone device after setting emul_temp
in order to make governor work according to input temperature immediately.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
---
 drivers/thermal/thermal_core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 547217c..9d951aa 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -777,6 +777,9 @@ emul_temp_store(struct device *dev, struct device_attribute *attr,
 		ret = tz->ops->set_emul_temp(tz, temperature);
 	}
 
+	if (!ret)
+		thermal_zone_device_update(tz);
+
 	return ret ? ret : count;
 }
 static DEVICE_ATTR(emul_temp, S_IWUSR, NULL, emul_temp_store);
-- 
1.8.2.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-01-02  7:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-02  7:47 [PATCH] Thermal: update thermal zone device after setting emul_temp Lan Tianyu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®