devm_phy_destroy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… devm_phy_destroy(9) β€” like, the Kernel API Manual edition, bestie πŸŽ€

okay so picture this: you're deep in drivers/phy land, the kernel is vibing, and you've got a PHY that needs to ✨ go away ✨. That's this page. It's giving cleanup era. It lives in the Kernel API Manual, and honestly? Iconic. πŸ¦‹


🌸 NAME 🌸

devm_phy_destroy β€” destroy the PHY, no cap πŸ’€


✨ SYNOPSIS ✨

void devm_phy_destroy (struct device *dev , struct phy *phy );

like, that's the whole signature. she's short, she's sweet, she returns void and takes no prisoners 🫢


🧚 ARGUMENTS 🧚

  • dev β€” the device that wants to release this phy. yes, this device. the one doing the releasing. main character energy πŸ‘‘
  • phy β€” the phy returned by devm_phy_get. don't just pass some random phy you found on the street, fr fr πŸ™ˆ

πŸ’– DESCRIPTION πŸ’–

so what does she actually do? two things. and she does them both:

  • destroys the devres associated with this phy πŸŽ€
  • invokes phy_destroy to destroy the phy πŸ’…

that's it. that's the function. devres gets yeeted, phy_destroy gets called, the phy is gone. slay. πŸ”₯


🌈 SEE ALSO 🌈

the whole friend group shows up for this one, iykyk. Kernel file ./drivers/phy/phy-core.c and then, in order:

like, a full roster. go read them all. or at least the ones you need. no pressure bestie 🫢


lowkey reminder: this is the devm flavour β€” the devres bookkeeping is the whole point, so don't go thinking you can skip it and manually free later. that's a different function's job, and she's in the SEE ALSO list above πŸ‘€

⭐ and that's the page!! brought to you by ./drivers/phy, dated October 2026, and filed under devm_phy_destroy(9) β€” go forth and destroy some PHYs responsibly, mwah πŸ’œπŸŒΈ

πŸ“¦ where this page comes from