of_phy_put(9)
π of_phy_put(9) β the Kernel API Manual, but make it cute β¨
Okay bestie, so we're in the Kernel API Manual today, and this little function is literally the "okay bye, thanks for the PHY" of the kernel world. It's short, it's sweet, and it's giving cleanup energy. Let's get into it π«Ά
πΈ NAME πΈ
of_phy_put β release the PHY. That's it. That's the whole vibe. You're letting go, you're moving on, you're closing the tab π¦
β¨ SYNOPSIS β¨
void of_phy_put (struct phy *phy );
No return value, no drama, no notes. She's void and she's thriving π
π ARGUMENTS π
phyβ the phy returned byof_phy_get. Yes, that one. The one you got earlier. Don't just grab any randomstruct phy *off the street, okay? This is a whole relationship, you have to keep track of the one you got π
π§ DESCRIPTION π§
So here's the tea: of_phy_put releases a refcount that the caller received from of_phy_get. That's the entire function. It's a one-liner icon.
Think of it like this β when you called of_phy_get, you picked up a refcount. You were holding it. Possibly for a long time. Possibly forgetting about it. And now? Now you're putting it down. Responsible main character behavior π₯
Not me holding refcounts I forgot to release π Bestie, that's how leaks happen. Don't be that girl.
π SEE ALSO π
Kernel file ./drivers/phy/phy-core.c, plus the whole PHY extended universe β because this function has so many siblings and honestly they all ate:
phy_create_lookup(9)phy_remove_lookup(9)phy_init(9)phy_exit(9)phy_power_on(9)phy_power_off(9)phy_calibrate(9)phy_notify_connect(9)phy_notify_disconnect(9)phy_notify_state(9)phy_configure(9)phy_validate(9)_of_phy_get(9)of_phy_get(9)phy_put(9)devm_phy_put(9)of_phy_simple_xlate(9)phy_get(9)devm_phy_get(9)devm_phy_optional_get(9)devm_of_phy_get(9)devm_of_phy_optional_get(9)devm_of_phy_get_by_index(9)phy_create(9)devm_phy_create(9)phy_destroy(9)devm_phy_destroy(9)__of_phy_provider_register(9)__devm_of_phy_provider_register(9)of_phy_provider_unregister(9)devm_of_phy_provider_unregister(9)phy_release(9)
Like, the whole family reunion is in here. iykyk π
π And that's the page, bestie! Sourced straight from ./drivers/phy, dated October 2026 β so go forth, put your PHYs back, and keep those refcounts balanced. Slay πβ¨
π¦ 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