--- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c @@ -638,8 +638,13 @@ static int iwl_mvm_tzone_get_temp(struct return 0; } +#if LINUX_VERSION_IS_GEQ(6,11,0) static int iwl_mvm_tzone_set_trip_temp(struct thermal_zone_device *device, const struct thermal_trip *trip, int temp) +#else +static int iwl_mvm_tzone_set_trip_temp(struct thermal_zone_device *device, + int trip, int temp) +#endif { struct iwl_mvm *mvm = thermal_zone_device_priv(device); @@ -682,13 +687,23 @@ static void iwl_mvm_thermal_zone_registe 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; +#if LINUX_VERSION_IS_GEQ(6,9,0) mvm->tz_device.trips[i].flags = THERMAL_TRIP_FLAG_RW_TEMP; +#endif } +#if LINUX_VERSION_IS_GEQ(6,9,0) mvm->tz_device.tzone = thermal_zone_device_register_with_trips(name, mvm->tz_device.trips, IWL_MAX_DTS_TRIPS, mvm, &tzone_ops, NULL, 0, 0); +#else + mvm->tz_device.tzone = thermal_zone_device_register_with_trips(name, + mvm->tz_device.trips, + IWL_MAX_DTS_TRIPS, 0, + mvm, &tzone_ops, + NULL, 0, 0); +#endif if (IS_ERR(mvm->tz_device.tzone)) { IWL_DEBUG_TEMP(mvm, "Failed to register to thermal zone (err = %ld)\n",