mdio_device_remove(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so this is mdio_device_remove(9) from the Kernel API Manual, and it's giving β€œcleanup era” ✨. The one-liner is: mdio_device_remove - Remove a previously registered mdio device from the MDIO bus. No cap, that's the whole vibe. πŸ¦‹

πŸŽ€ SYNOPSIS πŸŽ€

void mdio_device_remove (struct mdio_device *mdiodev );

🧚 ARGUMENTS 🧚

  • mdiodev β€” the mdio_device structure to remove. literally hand it over and it gets removed from the bus. πŸ’…

πŸ’… DESCRIPTION πŸ’…

okay bestie, real talk: this function doesn't free the mdio_device itself. It merely reverses the effects of mdio_device_register. That's the entire assignment. 🫢

So after you call mdio_device_remove, if you actually want the device freed, you use mdio_device_free to free the device after calling this function. Do not skip that step, iykyk. πŸ’€

⚠️ reminder: remove β‰  free. This call is the β€œundo the register” moment, not the β€œdestroy the struct” moment. Use mdio_device_free afterward for that. 😭

🌈 SEE ALSO 🌈


source/version: ./drivers/net/phy Β· date: October 2026 Β· page: mdio_device_remove(9) πŸ«ΆπŸ’–

πŸ“¦ where this page comes from