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 <tianyu.lan@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
This commit is contained in:
lan,Tianyu 2014-01-02 15:47:54 +08:00 committed by Zhang Rui
parent 7734e3ac89
commit 800744bf31
1 changed files with 3 additions and 0 deletions

View File

@ -777,6 +777,9 @@ emul_temp_store(struct device *dev, struct device_attribute *attr,
ret = tz->ops->set_emul_temp(tz, temperature); ret = tz->ops->set_emul_temp(tz, temperature);
} }
if (!ret)
thermal_zone_device_update(tz);
return ret ? ret : count; return ret ? ret : count;
} }
static DEVICE_ATTR(emul_temp, S_IWUSR, NULL, emul_temp_store); static DEVICE_ATTR(emul_temp, S_IWUSR, NULL, emul_temp_store);