aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorTilman Schmidt <tilman@imap.cc>2010-01-18 11:24:10 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-02-22 19:17:01 -0500
commit41a68a748bbc61f5bcea999e33ba72926dfbe6f7 (patch)
treed6b100c49d847270c235a9788b0bebb9372bcec9 /drivers/pci
parent7c9342b8dd1a32386fc32bffb9eedebbfe264763 (diff)
PCI: push deprecated pci_find_device() function to last user
The ISDN4Linux HiSax driver family contains the last remaining users of the deprecated pci_find_device() function. This patch creates a private copy of that function in HiSax, and removes the now unused global function together with its controlling configuration option, CONFIG_PCI_LEGACY. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/Kconfig11
-rw-r--r--drivers/pci/Makefile3
-rw-r--r--drivers/pci/legacy.c34
3 files changed, 0 insertions, 48 deletions
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index b1ecefa2a23d..7858a117e80b 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -21,17 +21,6 @@ config PCI_MSI
21 21
22 If you don't know what to do here, say N. 22 If you don't know what to do here, say N.
23 23
24config PCI_LEGACY
25 bool "Enable deprecated pci_find_* API"
26 depends on PCI
27 default y
28 help
29 Say Y here if you want to include support for the deprecated
30 pci_find_device() API. Most drivers have been converted over
31 to using the proper hotplug APIs, so this option serves to
32 include/exclude only a few drivers that are still using this
33 API.
34
35config PCI_DEBUG 24config PCI_DEBUG
36 bool "PCI Debugging" 25 bool "PCI Debugging"
37 depends on PCI && DEBUG_KERNEL 26 depends on PCI && DEBUG_KERNEL
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index adb74253a996..8674c1ebe979 100644
--- a/drivers/pci/Makefile
+++ b/drivers/pci/Makefile
@@ -10,9 +10,6 @@ obj-$(CONFIG_SYSFS) += slot.o
10 10
11obj-$(CONFIG_PCI_QUIRKS) += quirks.o 11obj-$(CONFIG_PCI_QUIRKS) += quirks.o
12 12
13obj-$(CONFIG_PCI_LEGACY) += legacy.o
14CFLAGS_legacy.o += -Wno-deprecated-declarations
15
16# Build PCI Express stuff if needed 13# Build PCI Express stuff if needed
17obj-$(CONFIG_PCIEPORTBUS) += pcie/ 14obj-$(CONFIG_PCIEPORTBUS) += pcie/
18 15
diff --git a/drivers/pci/legacy.c b/drivers/pci/legacy.c
deleted file mode 100644
index 871f65c15936..000000000000
--- a/drivers/pci/legacy.c
+++ /dev/null
@@ -1,34 +0,0 @@
1#include <linux/init.h>
2#include <linux/pci.h>
3#include <linux/module.h>
4#include <linux/interrupt.h>
5#include "pci.h"
6
7/**
8 * pci_find_device - begin or continue searching for a PCI device by vendor/device id
9 * @vendor: PCI vendor id to match, or %PCI_ANY_ID to match all vendor ids
10 * @device: PCI device id to match, or %PCI_ANY_ID to match all device ids
11 * @from: Previous PCI device found in search, or %NULL for new search.
12 *
13 * Iterates through the list of known PCI devices. If a PCI device is found
14 * with a matching @vendor and @device, a pointer to its device structure is
15 * returned. Otherwise, %NULL is returned.
16 * A new search is initiated by passing %NULL as the @from argument.
17 * Otherwise if @from is not %NULL, searches continue from next device
18 * on the global list.
19 *
20 * NOTE: Do not use this function any more; use pci_get_device() instead, as
21 * the PCI device returned by this function can disappear at any moment in
22 * time.
23 */
24struct pci_dev *pci_find_device(unsigned int vendor, unsigned int device,
25 struct pci_dev *from)
26{
27 struct pci_dev *pdev;
28
29 pci_dev_get(from);
30 pdev = pci_get_subsys(vendor, device, PCI_ANY_ID, PCI_ANY_ID, from);
31 pci_dev_put(pdev);
32 return pdev;
33}
34EXPORT_SYMBOL(pci_find_device);