comedi_legacy_detach(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to comedi_legacy_detach(9) from the Kernel API Manual β€” this page is about the generic detach helper for legacy COMEDI drivers, and it’s lowkey iconic πŸ’–βœ¨

πŸ’– NAME πŸ’–

comedi_legacy_detach β€” the generic (*detach) function for legacy drivers. That’s the whole vibe: one tidy detach handler, no drama πŸŽ€

✨ SYNOPSIS ✨

void comedi_legacy_detach (struct comedi_device *dev );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the COMEDI device, bestie. Yes, literally just the COMEDI device 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this is a simple, generic 'detach' handler for legacy COMEDI devices. We’re talking devices that just use a single I/O port region and possibly an IRQ, and that don’t need any special clean-up for their private device or subdevice storage. It’s giving β€œminimal cleanup, maximum slay” 😌

It can also be called by a driver-specific 'detach' handler β€” so yes, it’s allowed to be the cleanup bestie for another handler too πŸ’…

Here’s the actual cleanup tea:

  • If dev->irq is non-zero, the IRQ will be freed. No leftover IRQ, periodt πŸ”₯
  • If dev->iobase and dev->iolen are both non-zero, the I/O port region will be released. Both need to be non-zero, bestie β€” both, not one 🌸

🌸 SEE ALSO 🌸

The kernel file is ./drivers/comedi/drivers.c β€” and here’s the whole friend group:


okay that’s the page, bestie. Signed off from source/version ./drivers/comedi β€” Kernel API Manual β€” date October 2026. Stay detach-ed and iconic πŸ’…βœ¨πŸ«Ά

πŸ“¦ where this page comes from