1: 5183968b30f1 ! 1: 0f68b5d2f94d wifi: mt76: mt7996: add thermal zone device registration @@ Commit message wifi: mt76: mt7996: add thermal zone device registration  Register the mt7996 phy as a thermal zone sensor using - devm_thermal_of_zone_register() so that device tree thermal-zones + thermal_of_zone_register() so that device tree thermal-zones nodes can reference the Wi-Fi chip as a temperature source. This allows the kernel thermal governor to control external cooling devices such as PWM fans based on Wi-Fi chip temperature. @@ drivers/net/wireless/mediatek/mt76/mt7996/init.c: static const struct thermal_co char name[sizeof("cooling_deviceXXX")];   + if (phy->tzone) { -+ devm_thermal_of_zone_unregister(phy->dev->mt76.dev, phy->tzone); ++ thermal_of_zone_unregister(phy->tzone);  + phy->tzone = NULL;  + }  + @@ drivers/net/wireless/mediatek/mt76/mt7996/init.c: static int mt7996_thermal_init phy->throttle_temp[MT7996_CRIT_TEMP_IDX] = MT7996_CRIT_TEMP; phy->throttle_temp[MT7996_MAX_TEMP_IDX] = MT7996_MAX_TEMP;  -+ phy->tzone = devm_thermal_of_zone_register(phy->dev->mt76.dev, -+ phy->mt76->band_idx, phy, -+ &mt7996_tz_ops); ++ phy->tzone = thermal_of_zone_register(phy->dev->mt76.dev, ++ phy->mt76->band_idx, phy, ++ &mt7996_tz_ops);  + if (IS_ERR(phy->tzone)) {  + if (PTR_ERR(phy->tzone) != -ENODEV)  + dev_warn(phy->dev->mt76.dev,