comedi_pci_detach(9)
π comedi_pci_detach β a whole manual page, bestie
okay so this is a page from the Kernel API Manual and it's literally about the comedi_pci_detach(9) function, and by the end of this you're gonna know it like the back of your hand. no cap. π«Ά
β¨ NAME β¨
comedi_pci_detach β the generic "detach" handler for PCI COMEDI drivers. that's it, that's the whole name section, and it ate. π
πΈ SYNOPSIS πΈ
void comedi_pci_detach (struct comedi_device *dev );
yes that's the whole signature. gorgeous. iconic. one argument. π
π¦ ARGUMENTS π¦
devβ the COMEDI device. that's your one (1) parameter, and she's a pointer to astruct comedi_device. main character energy fr. π
π DESCRIPTION π
so here's the vibe. COMEDI drivers for PCI devices β but only the ones that need no special clean-up of private data and have no ioremapped regions other than the one that dev->mmio points to β can use this function as their "detach" handler. the COMEDI core calls it when a COMEDI device is being detached from the low-level driver. π«
and bestie, it can also be called from a more specific "detach" handler that does extra clean-up on top. so she's flexible like that. π
here's exactly what she does, no more no less:
- frees the IRQ if
dev->irqis non-zero π₯ - iounmaps
dev->mmioif it is non-NULLπ§ - calls
comedi_pci_disableto release the PCI device's regions and disable it π
that's the whole to-do list. three things. she's efficient and we love that for her.
ngl, this is a "generic" handler, so the important caveat is right there in the description: if your driver does have private data clean-up or extra ioremapped regions, this alone is not gonna cut it β that's exactly why the more specific "detach" handler situation exists. π«Ά
π SEE ALSO π
- Kernel file
./drivers/comedi/comedi_pci.cβ go read the source, iykyk π comedi_to_pci_dev(9)comedi_pci_enable(9)comedi_pci_disable(9)comedi_pci_auto_config(9)comedi_pci_auto_unconfig(9)comedi_pci_driver_register(9)comedi_pci_driver_unregister(9)
like, the whole friend group. go say hi to all of them. π―ββοΈ
and that's the page!! π this one lives under ./drivers/comedi and it's dated October 2026, and she's part of the Kernel API Manual β so yeah, mwah, go detach responsibly, ily, bye!! πΈπ¦β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms