From: lan,Tianyu Date: Thu, 2 Jan 2014 07:47:54 +0000 (+0800) Subject: Thermal: update thermal zone device after setting emul_temp X-Git-Tag: firefly_0821_release~3680^2~36^2~22^2~3 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3a68305f1f92040bc57d6ea94bedde1b694d0356;p=firefly-linux-kernel-4.4.55.git Thermal: update thermal zone device after setting emul_temp 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 Signed-off-by: Zhang Rui (cherry picked from commit 800744bf31df54b0cd4d1104ccfa426d3f578f0e) Signed-off-by: Alex Shi --- diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 07d80cc0a91b..edc0cb88f1d0 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);