cdev_device_del(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay bestie, this is the cdev_device_del(9) page from the Kernel API Manual, and it is literally the inverse of cdev_device_add β€” no cap. πŸ’…βœ¨

cdev_device_del β€” inverse of cdev_device_add 🫢


✨ SYNOPSIS ✨

void cdev_device_del (struct cdev *cdev , struct device *dev );

πŸŽ€ ARGUMENTS πŸŽ€

  • cdev β€” the cdev structure πŸ’–
  • dev β€” the device structure ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, cdev_device_del is a helper function that calls cdev_del and device_del. that's the whole vibe. 🫢

It should be used whenever cdev_device_add is used β€” like, they're a matching set, iykyk. πŸ‘‘

If dev->devt is not set, it will not remove the cdev and will be equivalent to device_del. periodt. πŸ’…


🚨 NOTE 🚨

okay, important guarantee time: this guarantees that associated sysfs callbacks are not running or runnable. iconic. ✨

but bestie, plot twist 😭: any cdevs already open will remain, and their fops will still be callable even after this function returns. so don't think this closes absolutely everything β€” fr fr.

🌈 SEE ALSO 🌈

Kernel file: ./fs/char_dev.c 🧚

the whole related squad is right here:


okay bye bestie, this page is serving source/version energy from ./fs, dated October 2026 β€” cdev_device_del(9) out. mwah! πŸ’‹βœ¨πŸŒΈ

πŸ“¦ where this page comes from