aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-10-29 09:48:09 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-11-05 16:35:17 -0500
commitbd3989e006ed1c88d47c3308746ae0330fc1bcf4 (patch)
treee2e5bb10e57e901519f998f9ac703d3bc8bb9c1e /drivers/pci
parentccb9d59e682d7bd758457b6d2458365cc68fad7a (diff)
PCI: Add Kconfig option to disable deprecated pci_find_* API
Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/Kconfig11
-rw-r--r--drivers/pci/hotplug/Kconfig6
-rw-r--r--drivers/pci/search.c9
3 files changed, 23 insertions, 3 deletions
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index 7a1d6d512837..e1ca42591ac4 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -21,6 +21,17 @@ 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_slot() and pci_find_device() APIs. Most drivers have
31 been converted over to using the proper hotplug APIs, so this
32 option serves to include/exclude only a few drivers that are
33 still using this API.
34
24config PCI_DEBUG 35config PCI_DEBUG
25 bool "PCI Debugging" 36 bool "PCI Debugging"
26 depends on PCI && DEBUG_KERNEL 37 depends on PCI && DEBUG_KERNEL
diff --git a/drivers/pci/hotplug/Kconfig b/drivers/pci/hotplug/Kconfig
index 63d62752fb91..a64449d489d6 100644
--- a/drivers/pci/hotplug/Kconfig
+++ b/drivers/pci/hotplug/Kconfig
@@ -41,7 +41,7 @@ config HOTPLUG_PCI_FAKE
41 41
42config HOTPLUG_PCI_COMPAQ 42config HOTPLUG_PCI_COMPAQ
43 tristate "Compaq PCI Hotplug driver" 43 tristate "Compaq PCI Hotplug driver"
44 depends on X86 && PCI_BIOS 44 depends on X86 && PCI_BIOS && PCI_LEGACY
45 help 45 help
46 Say Y here if you have a motherboard with a Compaq PCI Hotplug 46 Say Y here if you have a motherboard with a Compaq PCI Hotplug
47 controller. 47 controller.
@@ -63,7 +63,7 @@ config HOTPLUG_PCI_COMPAQ_NVRAM
63 63
64config HOTPLUG_PCI_IBM 64config HOTPLUG_PCI_IBM
65 tristate "IBM PCI Hotplug driver" 65 tristate "IBM PCI Hotplug driver"
66 depends on X86_IO_APIC && X86 && PCI_BIOS 66 depends on X86_IO_APIC && X86 && PCI_BIOS && PCI_LEGACY
67 help 67 help
68 Say Y here if you have a motherboard with a IBM PCI Hotplug 68 Say Y here if you have a motherboard with a IBM PCI Hotplug
69 controller. 69 controller.
@@ -119,7 +119,7 @@ config HOTPLUG_PCI_CPCI_ZT5550
119 119
120config HOTPLUG_PCI_CPCI_GENERIC 120config HOTPLUG_PCI_CPCI_GENERIC
121 tristate "Generic port I/O CompactPCI Hotplug driver" 121 tristate "Generic port I/O CompactPCI Hotplug driver"
122 depends on HOTPLUG_PCI_CPCI && X86 122 depends on HOTPLUG_PCI_CPCI && X86 && PCI_LEGACY
123 help 123 help
124 Say Y here if you have a CompactPCI system card that exposes the #ENUM 124 Say Y here if you have a CompactPCI system card that exposes the #ENUM
125 hotswap signal as a bit in a system register that can be read through 125 hotswap signal as a bit in a system register that can be read through
diff --git a/drivers/pci/search.c b/drivers/pci/search.c
index b001b5922e33..8541034021f0 100644
--- a/drivers/pci/search.c
+++ b/drivers/pci/search.c
@@ -113,6 +113,8 @@ pci_find_next_bus(const struct pci_bus *from)
113 return b; 113 return b;
114} 114}
115 115
116#ifdef CONFIG_PCI_LEGACY
117
116/** 118/**
117 * pci_find_slot - locate PCI device from a given PCI slot 119 * pci_find_slot - locate PCI device from a given PCI slot
118 * @bus: number of PCI bus on which desired PCI device resides 120 * @bus: number of PCI bus on which desired PCI device resides
@@ -137,6 +139,8 @@ pci_find_slot(unsigned int bus, unsigned int devfn)
137 return NULL; 139 return NULL;
138} 140}
139 141
142#endif /* CONFIG_PCI_LEGACY */
143
140/** 144/**
141 * pci_get_slot - locate PCI device for a given PCI slot 145 * pci_get_slot - locate PCI device for a given PCI slot
142 * @bus: PCI bus on which desired PCI device resides 146 * @bus: PCI bus on which desired PCI device resides
@@ -200,6 +204,7 @@ struct pci_dev * pci_get_bus_and_slot(unsigned int bus, unsigned int devfn)
200 return NULL; 204 return NULL;
201} 205}
202 206
207#ifdef CONFIG_PCI_LEGACY
203/** 208/**
204 * pci_find_subsys - begin or continue searching for a PCI device by vendor/subvendor/device/subdevice id 209 * pci_find_subsys - begin or continue searching for a PCI device by vendor/subvendor/device/subdevice id
205 * @vendor: PCI vendor id to match, or %PCI_ANY_ID to match all vendor ids 210 * @vendor: PCI vendor id to match, or %PCI_ANY_ID to match all vendor ids
@@ -278,6 +283,7 @@ pci_find_device(unsigned int vendor, unsigned int device, const struct pci_dev *
278{ 283{
279 return pci_find_subsys(vendor, device, PCI_ANY_ID, PCI_ANY_ID, from); 284 return pci_find_subsys(vendor, device, PCI_ANY_ID, PCI_ANY_ID, from);
280} 285}
286#endif /* CONFIG_PCI_LEGACY */
281 287
282/** 288/**
283 * pci_get_subsys - begin or continue searching for a PCI device by vendor/subvendor/device/subdevice id 289 * pci_get_subsys - begin or continue searching for a PCI device by vendor/subvendor/device/subdevice id
@@ -468,8 +474,11 @@ int pci_dev_present(const struct pci_device_id *ids)
468EXPORT_SYMBOL(pci_dev_present); 474EXPORT_SYMBOL(pci_dev_present);
469EXPORT_SYMBOL(pci_find_present); 475EXPORT_SYMBOL(pci_find_present);
470 476
477#ifdef CONFIG_PCI_LEGACY
471EXPORT_SYMBOL(pci_find_device); 478EXPORT_SYMBOL(pci_find_device);
472EXPORT_SYMBOL(pci_find_slot); 479EXPORT_SYMBOL(pci_find_slot);
480#endif /* CONFIG_PCI_LEGACY */
481
473/* For boot time work */ 482/* For boot time work */
474EXPORT_SYMBOL(pci_find_bus); 483EXPORT_SYMBOL(pci_find_bus);
475EXPORT_SYMBOL(pci_find_next_bus); 484EXPORT_SYMBOL(pci_find_next_bus);