kernel: update kernel 4.1 to version 4.1.20
[openwrt/staging/yousong.git] / target / linux / mediatek / patches / 0012-thermal-remove-useless-call-to-thermal_zone_device_s.patch
index f4e237f36918cc85498e19fb330942f44fa666c5..7bdff5538412136b34a95a70a7e8fc79569de703 100644 (file)
@@ -17,13 +17,13 @@ Acked-by: Eduardo Valentin <edubezval@gmail.com>
 
 --- a/drivers/thermal/thermal_core.c
 +++ b/drivers/thermal/thermal_core.c
-@@ -1571,9 +1571,6 @@ struct thermal_zone_device *thermal_zone
+@@ -1601,9 +1601,6 @@ struct thermal_zone_device *thermal_zone
  
        INIT_DELAYED_WORK(&(tz->poll_queue), thermal_zone_device_check);
  
 -      if (!tz->ops->get_temp)
 -              thermal_zone_device_set_polling(tz, 0);
 -
-       thermal_zone_device_update(tz);
-       return tz;
+       thermal_zone_device_reset(tz);
+       /* Update the new thermal zone and mark it as already updated. */
+       if (atomic_cmpxchg(&tz->need_update, 1, 0))