diff options
author | Rafael J. Wysocki <[email protected]> | 2024-02-12 19:38:07 +0100 |
---|---|---|
committer | Rafael J. Wysocki <[email protected]> | 2024-02-27 12:04:01 +0100 |
commit | 96c5330bf75839a31d6fdf953fade6e9fbf30bde (patch) | |
tree | e9bb200deb30d2447a2e11f17d29ea6634bbec76 | |
parent | c7ebf8e5d0681198347d515ff0702669b565d423 (diff) |
wifi: iwlwifi: mvm: Set THERMAL_TRIP_FLAG_RW_TEMP directly
It is now possible to flag trip points with THERMAL_TRIP_FLAG_RW_TEMP
to allow their temperature to be set from user space via sysfs instead
of using a nonzero writable trips mask during thermal zone registration,
so make the iwlwifi code do that.
No intentional functional impact.
Note that this change is requisite for dropping the mask argument from
thermal_zone_device_register_with_trips() going forward.
Signed-off-by: Rafael J. Wysocki <[email protected]>
Reviewed-by: Daniel Lezcano <[email protected]>
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c index d2a00cbcbc42..2353177f2dfa 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c @@ -667,9 +667,6 @@ static struct thermal_zone_device_ops tzone_ops = { .set_trip_temp = iwl_mvm_tzone_set_trip_temp, }; -/* make all trips writable */ -#define IWL_WRITABLE_TRIPS_MSK (BIT(IWL_MAX_DTS_TRIPS) - 1) - static void iwl_mvm_thermal_zone_register(struct iwl_mvm *mvm) { int i, ret; @@ -692,11 +689,12 @@ static void iwl_mvm_thermal_zone_register(struct iwl_mvm *mvm) for (i = 0 ; i < IWL_MAX_DTS_TRIPS; i++) { mvm->tz_device.trips[i].temperature = THERMAL_TEMP_INVALID; mvm->tz_device.trips[i].type = THERMAL_TRIP_PASSIVE; + mvm->tz_device.trips[i].flags = THERMAL_TRIP_FLAG_RW_TEMP; } mvm->tz_device.tzone = thermal_zone_device_register_with_trips(name, mvm->tz_device.trips, IWL_MAX_DTS_TRIPS, - IWL_WRITABLE_TRIPS_MSK, + 0, mvm, &tzone_ops, NULL, 0, 0); if (IS_ERR(mvm->tz_device.tzone)) { |