pci_dev_driver(9)
π pci_dev_driver(9) β get the pci_driver of a device
okay so bestie, welcome to the Kernel API Manual (yes, that's the manual name, we're fancy here), and today's main character is a tiny little lookup function that's lowkey carrying the whole PCI bus. let me put you on π«Ά
β¨ NAME β¨
pci_dev_driver β get the pci_driver of a device
like, you hand it a device, it hands you back the driver. that's the whole vibe check. π
πΈ SYNOPSIS πΈ
struct pci_driver * pci_dev_driver (const struct pci_dev *dev );
not me giving you the signature exactly as it is, character for character, because we do not play with typos in this house π
π¦ ARGUMENTS π¦
devβ the device to query π like, the one you're asking about. that's it. that's the whole arg.
β DESCRIPTION β
so the way that this works is: it returns the appropriate pci_driver structure β or NULL if there is no registered driver for the device. π
fr fr, that's the deal. driver exists? you get it. driver doesn't exist? NULL, and you go touch grass.
ngl bestie, always check for NULL before you dereference. the kernel does not forgive, and it does not forget π
π₯ SEE ALSO π₯
the whole friend group, no cap β plus the kernel file they all live in:
- Kernel file
./drivers/pci/pci-driver.c do_pci_add_dynid(9)pci_add_dynid(9)do_pci_match_id(9)pci_match_id(9)pci_match_device(9)new_id_store(9)remove_id_store(9)__pci_device_probe(9)pci_restore_standard_config(9)__pci_register_driver(9)pci_unregister_driver(9)pci_bus_match(9)pci_dev_get(9)pci_dev_put(9)pci_uevent_ers(9)pci_dma_configure(9)
all of them, every single one, no skipping, because you deserve the full lore π§β¨
anyway that's the page!! it lives in ./drivers/pci and it's dated October 2026 β mwah, iconic, periodt ππ
π¦ 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