diff options
Diffstat (limited to 'target/linux/mediatek/patches/0012-thermal-remove-useless-call-to-thermal_zone_device_s.patch')
-rw-r--r-- | target/linux/mediatek/patches/0012-thermal-remove-useless-call-to-thermal_zone_device_s.patch | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/target/linux/mediatek/patches/0012-thermal-remove-useless-call-to-thermal_zone_device_s.patch b/target/linux/mediatek/patches/0012-thermal-remove-useless-call-to-thermal_zone_device_s.patch index f4e237f369..7bdff55384 100644 --- a/target/linux/mediatek/patches/0012-thermal-remove-useless-call-to-thermal_zone_device_s.patch +++ b/target/linux/mediatek/patches/0012-thermal-remove-useless-call-to-thermal_zone_device_s.patch @@ -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)) |