devm_therma...e_unregister(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 to struct thermal_zone where 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:

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