devm_therma...e_unregister(9)
π devm_therma...e_unregister(9) π
okay so bestie, welcome to the Kernel API Manual β¨ β yes the title got truncated in the header and honestly? it's giving main-character-with-a-long-name energy, we don't judge. Let's get into it π«Ά
πΈ NAME πΈ
devm_thermal_of_zone_unregister β it's literally the resource managed version of thermal_of_zone_unregister(). that's the whole vibe. no cap π
β¨ SYNOPSIS β¨
void devm_thermal_of_zone_unregister (struct device *dev , struct
thermal_zone_device *tz );
that's it, that's the function. two args, no return value, void and slaying π
π¦ ARGUMENTS π¦
devβ the Device for which the resource was allocated. like, whose resource is this anyway?? it's this one's, bestie πtzβ a pointer tostruct thermal_zonewhere the sensor is registered. that's your zone, your girl, your responsibility πΈ
π₯ DESCRIPTION π₯
so what does it actually do? it removes the sensor callbacks and private data from the thermal zone device that got registered with the devm_thermal_zone_of_sensor_register API. cleaning up after the party, basically π§Ήβ¨
it will also silent the zone by remove the .get_temp and .get_trend thermal zone device callbacks. yep β the zone gets quiet. no more temp, no more trend, she's not talking anymore ππ
but like, plot twist: Normally this function will not need to be called and the resource management code will ensure that the resource is freed. so the devm machinery already has your back, fr fr π«Ά you usually just... don't. π
π SEE ALSO π
peep the Kernel file ./drivers/thermal/thermal_of.c for all the related icons, and also these very iconic siblings:
thermal_of_get_trip_type(9)thermal_of_zone_unregister(9)thermal_of_zone_register(9)devm_thermal_of_zone_register(9)thermal_of_cooling_device_register(9)devm_thermal_of_cooling_device_register(9)devm_thermal_of_child_cooling_device_register(9)
the whole friend group honestly ππ
okay that's the page!! mwah π
this little number lives in ./drivers/thermal, dated October 2026, and it's brought to you by the Kernel API Manual β same energy, same truncated name in the corner, iconic as ever πβ iykyk
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms