Skip to content

Commit 96c5330

Browse files
committed
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 <rafael.j.wysocki@intel.com> Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
1 parent c7ebf8e commit 96c5330

File tree

1 file changed

+2
-4
lines changed
  • drivers/net/wireless/intel/iwlwifi/mvm

1 file changed

+2
-4
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/tt.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -667,9 +667,6 @@ static struct thermal_zone_device_ops tzone_ops = {
667667
.set_trip_temp = iwl_mvm_tzone_set_trip_temp,
668668
};
669669

670-
/* make all trips writable */
671-
#define IWL_WRITABLE_TRIPS_MSK (BIT(IWL_MAX_DTS_TRIPS) - 1)
672-
673670
static void iwl_mvm_thermal_zone_register(struct iwl_mvm *mvm)
674671
{
675672
int i, ret;
@@ -692,11 +689,12 @@ static void iwl_mvm_thermal_zone_register(struct iwl_mvm *mvm)
692689
for (i = 0 ; i < IWL_MAX_DTS_TRIPS; i++) {
693690
mvm->tz_device.trips[i].temperature = THERMAL_TEMP_INVALID;
694691
mvm->tz_device.trips[i].type = THERMAL_TRIP_PASSIVE;
692+
mvm->tz_device.trips[i].flags = THERMAL_TRIP_FLAG_RW_TEMP;
695693
}
696694
mvm->tz_device.tzone = thermal_zone_device_register_with_trips(name,
697695
mvm->tz_device.trips,
698696
IWL_MAX_DTS_TRIPS,
699-
IWL_WRITABLE_TRIPS_MSK,
697+
0,
700698
mvm, &tzone_ops,
701699
NULL, 0, 0);
702700
if (IS_ERR(mvm->tz_device.tzone)) {

0 commit comments

Comments
 (0)