diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-30 05:18:12 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-07-01 16:35:50 -0400 |
commit | 75865858971add95809c5c9cd35dc4cfba08e33b (patch) | |
tree | e8b3fe78e15696f36156d1f94d35b7711590365f /include | |
parent | 299de0343c7d18448a69c635378342e9214b14af (diff) |
[PATCH] PCI: clean up dynamic pci id logic
The dynamic pci id logic has been bothering me for a while, and now that
I started to look into how to move some of this to the driver core, I
thought it was time to clean it all up.
It ends up making the code smaller, and easier to follow, and fixes a
few bugs at the same time (dynamic ids were not being matched
everywhere, and so could be missed on some call paths for new devices,
semaphore not needed to be grabbed when adding a new id and calling the
driver core, etc.)
I also renamed the function pci_match_device() to pci_match_id() as
that's what it really does.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/pci-dynids.h | 18 | ||||
-rw-r--r-- | include/linux/pci.h | 3 |
2 files changed, 2 insertions, 19 deletions
diff --git a/include/linux/pci-dynids.h b/include/linux/pci-dynids.h deleted file mode 100644 index 183b6b0de81c..000000000000 --- a/include/linux/pci-dynids.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * PCI defines and function prototypes | ||
3 | * Copyright 2003 Dell Inc. | ||
4 | * by Matt Domsch <Matt_Domsch@dell.com> | ||
5 | */ | ||
6 | |||
7 | #ifndef LINUX_PCI_DYNIDS_H | ||
8 | #define LINUX_PCI_DYNIDS_H | ||
9 | |||
10 | #include <linux/list.h> | ||
11 | #include <linux/mod_devicetable.h> | ||
12 | |||
13 | struct dynid { | ||
14 | struct list_head node; | ||
15 | struct pci_device_id id; | ||
16 | }; | ||
17 | |||
18 | #endif | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index a46cabfd08c8..7ac14961ba22 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -860,7 +860,8 @@ int pci_register_driver(struct pci_driver *); | |||
860 | void pci_unregister_driver(struct pci_driver *); | 860 | void pci_unregister_driver(struct pci_driver *); |
861 | void pci_remove_behind_bridge(struct pci_dev *); | 861 | void pci_remove_behind_bridge(struct pci_dev *); |
862 | struct pci_driver *pci_dev_driver(const struct pci_dev *); | 862 | struct pci_driver *pci_dev_driver(const struct pci_dev *); |
863 | const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev); | 863 | const struct pci_device_id *pci_match_device(struct pci_driver *drv, struct pci_dev *dev); |
864 | const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, struct pci_dev *dev); | ||
864 | int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass); | 865 | int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass); |
865 | 866 | ||
866 | /* kmem_cache style wrapper around pci_alloc_consistent() */ | 867 | /* kmem_cache style wrapper around pci_alloc_consistent() */ |