diff mbox series

[1/6] iwlwifi: use thermal_zone_device_update() for temperature change

Message ID 20200430063229.6182-2-rui.zhang@intel.com
State New
Headers show
Series [1/6] iwlwifi: use thermal_zone_device_update() for temperature change | expand

Commit Message

Zhang, Rui April 30, 2020, 6:32 a.m. UTC
thermal_notify_framework() is an obsolete API, and iwlwifi is the only
user of it.
Convert iwlwifi driver to use thermal_zone_device_update() instead.

Note that, thermal_zone_device_update() is able to handle the crossed
threshold by comparing the current temperature with every trip point, so
ths_crossed variant in iwl_mvm_temp_notif() is probably not needed.
It is still left there in this patch, in case the debug information is
still needed.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
index 418e59b..6344b6b 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
@@ -203,9 +203,8 @@  void iwl_mvm_temp_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb)
 
 	if (mvm->tz_device.tzone) {
 		struct iwl_mvm_thermal_device *tz_dev = &mvm->tz_device;
-
-		thermal_notify_framework(tz_dev->tzone,
-					 tz_dev->fw_trips_index[ths_crossed]);
+		thermal_zone_device_update(tz_dev->tzone,
+					   THERMAL_EVENT_UNSPECIFIED);
 	}
 #endif /* CONFIG_THERMAL */
 }