summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-12-15 01:19:53 (GMT)
committerEduardo Valentin <edubezval@gmail.com>2016-01-07 02:06:39 (GMT)
commitad74e46cb3ba9e706f91f3f71baf816d2d8e45db (patch)
tree70b98c2bb70fd9f7766d0cfbb17ad1606e01b965
parent5440c40b900fa561add48a7e70e9c892f0551387 (diff)
downloadlinux-ad74e46cb3ba9e706f91f3f71baf816d2d8e45db.tar.xz
thermal: trip_point_temp_store() calls thermal_zone_device_update()
trip_point_temp_store() updates trip temperature. It should call thermal_zone_device_update() immediately. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
-rw-r--r--drivers/thermal/thermal_core.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index d9e525c..768fb10 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -676,8 +676,12 @@ trip_point_temp_store(struct device *dev, struct device_attribute *attr,
return -EINVAL;
ret = tz->ops->set_trip_temp(tz, trip, temperature);
+ if (ret)
+ return ret;
- return ret ? ret : count;
+ thermal_zone_device_update(tz);
+
+ return count;
}
static ssize_t