comedi_to_pcmcia_dev(9)
π comedi_to_pcmcia_dev(9) β like, the Kernel API Manual era π
okay bestie, buckle up, because this one is a tiny little helper function in the kernel and it's honestly so straightforward it's giving "one-line baddie" energy β¨ This page lives in the Kernel API Manual, section 9 (iykyk), and it's all about digging the PCMCIA device out of a COMEDI device. Let's go π¦
β¨ NAME β¨
comedi_to_pcmcia_dev β returns the PCMCIA device that's attached to a COMEDI device. That's it. That's the whole job. π
πΈ SYNOPSIS πΈ
struct pcmcia_device * comedi_to_pcmcia_dev (struct comedi_device *dev
);
π ARGUMENTS π
devβ your COMEDI device. literally the one you're handing over so it can spill where its hardware friend lives π«Ά
π DESCRIPTION π
so here's the vibe: assuming dev->hw_dev is non-NULL, we just trust that it's pointing to a struct device that's embedded inside a struct pcmcia_device. That's the whole assumption. No cap, that's it. π§
(it's specifically a struct device embedded in a struct pcmcia_device, which is the classic container-of situation β the function is just doing the lookup for you so you don't have to think about it π)
π₯ RETURN π₯
- if
dev->hw_devis non-NULL β you get the attached PCMCIA device π - if
dev->hw_devis NULL β you getNULL. nothing. nada. the void. π
β SEE ALSO β
all the siblings in ./drivers/comedi/comedi_pcmcia.c β go say hi to the whole family bestie π
comedi_pcmcia_enable(9)comedi_pcmcia_disable(9)comedi_pcmcia_auto_config(9)comedi_pcmcia_auto_unconfig(9)comedi_pcmcia_driver_register(9)comedi_pcmcia_driver_unregister(9)
and that's the page, bestie π this iconic little entry comes from ./drivers/comedi and it's dated October 2026 β so yeah, mark your calendars, the future is now, mwah ππ
β¨
π¦ 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