I think you refer to linux 2.4 or older. Current kernel device model with busses, devices and drivers has always been part of the 2.6 series.
What is your question exactly ?
A list of PCI devices is made at boot time. Then when a driver is registered, the pci_driver
structure id_table
field is used to match
with the devices present on the bus. Then the pci_driver probe function is called with a pointer to the device structure that matched.
- pci_driver is registered
- for each device present on the bus, id element of the device(product id and vendor id) are compared to id element in the id_table provided by pci_driver
- if there is a match, the pci_driver probe function is called, and in this probe function you can register a char device, or a block device etc ..
So it is not very different from 2.4, except all the probing, matching driver and devices, etc... is handled by the "device core" and not by the pci driver.
For a detailed explanation, see this PDF and this page