device_del(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… device_del(9) β€” from the Kernel API Manual, bestie ✨

okay so real talk: this one's called device_del and it's the "break up with your device, but politely" function. It lives in the Kernel API Manual section 9 (that's the kernel-internals girlies πŸŽ€), and honestly? she's a short page but she's important, so let's get into it.


🌸 NAME 🌸

device_del β€” delete device from system. that's it. that's the whole vibe. bye-bye device πŸ¦‹


✨ SYNOPSIS ✨

void device_del (struct device *dev );

like, no return value, no drama. she just goes in, does the thing, and leaves πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device. yes, that's the entire description in the original and honestly it's giving "minimalist icon". this is the struct device * you're evicting from the system.

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so this is the first part of the device unregistration sequence β€” think of it as part one of a two-part finale, not the whole goodbye. here's what she actually does:

  • removes the device from the lists we control from here (our lists, our rules πŸ’…)
  • has it removed from the other driver model subsystems it was added to back in device_add
  • and removes it from the kobject hierarchy

so basically: three different friend groups, one very thorough "we need to talk" text 🌈


πŸ’€ NOTE πŸ’€

this should be called manually _iff_ device_add was also called manually.

read that twice bestie. iff β€” if and only if. you only do the manual breakup if you did the manual setup. symmetry, periodt. ✨


πŸ”₯ SEE ALSO πŸ”₯

okay this list is long and I'm not skipping a single one, because every one of these is somebody's hyperfixation. all of these live in the kernel file ./drivers/base/core.c:

like, that's the whole friend group 😭 go read them, they're all icons.


🫢 and that's the page!! huge shoutout to the ./drivers/base directory for hosting all this, and this lil guy is dated October 2026 β€” future energy fr fr. stay slay, unregister responsibly, and always remember the iff πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from