device_unregister(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

device_unregister β€” unregister device from system. And yes bestie, this is the device_unregister(9) page from the Kernel API Manual; we're doing this together 🫢✨

✨ SYNOPSIS ✨

void device_unregister (struct device *dev );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” device going away. That's the whole argument, no extra lore πŸ’…

πŸ’… DESCRIPTION πŸ’…

Okay so we do this in two parts, literally the same way we do device_register. First, we remove it from all the subsystems with device_del, then we decrement the reference count via put_device.

If that is the final reference count, the device will be cleaned up via device_release above. Otherwise, the structure will stick around until the final reference to the device is dropped. Lowkey it's giving "not gone until the last bestie leaves the group chat" energy 😭✨

🌈 SEE ALSO 🌈

Kernel file ./drivers/base/core.c β€” here's the whole squad of related symbols, no cap:

signed off from ./drivers/base, October 2026 β€” page: device_unregister(9) πŸ«ΆπŸ’–

πŸ“¦ where this page comes from