device_destroy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

Okay so before we even get into it β€” yes, this is a page from the Kernel API Manual, and yes, device_destroy(9) is the icon we're talking about today. She's short, she's sweet, she's the cleanup queen, and honestly? She ate. πŸ’–


✨ NAME ✨

device_destroy β€” removes a device that was created with device_create()

Like, that's her whole job description and she's not ashamed of it. πŸŽ€


🌸 SYNOPSIS 🌸

void device_destroy (const struct class *class , dev_t devt );

Look at her. Two arguments, no return value, zero drama. πŸ¦‹


πŸ’œ ARGUMENTS πŸ’œ

  • class β€” pointer to the struct class that this device was registered with. You know, the friend group she belongs to. You gotta name it.
  • devt β€” the dev_t of the device that was previously registered. This is her specific little ID tag from when she first showed up. πŸ’…

πŸ”₯ DESCRIPTION πŸ”₯

So here's the tea, bestie: this call unregisters and cleans up a device that was created with a call to device_create. That's it. That's the whole vibe.

Think of it like this β€” device_create is the glow-up, device_destroy is the graceful exit. She comes in, unregisters the device, cleans everything up, and leaves no mess behind. Main character energy from start to finish. πŸ‘‘

No cap though β€” this is a real kernel function, so it's doing actual unregistering and cleanup work under the hood. She's cute and she's serious. 😌

⭐ SEE ALSO ⭐

Bestie, the friend group is HUGE. Buckle in, we're gonna be here a sec. 🫢

Kernel file ./drivers/base/core.c:

That's the whole guest list. She knows everyone. iykyk. πŸ’€βœ¨


πŸ’– ok that's the page!! tysm for reading bestie, go forth and destroy some devices (responsibly) πŸ’–

Lil sign-off from the source files: this one lives in ./drivers/base, and it's dated October 2026. Slay. πŸ§šβ€β™€οΈπŸŒΈ

πŸ“¦ where this page comes from