thermal: trip_point_temp_store() calls thermal_zone_device_update()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 15 Dec 2015 01:19:53 +0000 (01:19 +0000)
committerEduardo Valentin <edubezval@gmail.com>
Thu, 7 Jan 2016 02:06:39 +0000 (18:06 -0800)
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>
drivers/thermal/thermal_core.c

index d9e525cc9c1ce24bcd9d55dd59730f375b15d552..768fb10eb962ddece9790cd79fd750db7477b974 100644 (file)
@@ -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