PCI: Add Kconfig option to disable deprecated pci_find_* API

Signed-off-by: Jeff Garzik <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
Jeff Garzik 2007-10-29 09:48:09 -04:00 • committed by Greg Kroah-Hartman
commit bd3989e006
12 changed files with 52 additions and 26 deletions

View file

@ -21,6 +21,17 @@ config PCI_MSI
If you don't know what to do here, say N.
config PCI_LEGACY
bool "Enable deprecated pci_find_* API"
depends on PCI
default y
help
Say Y here if you want to include support for the deprecated
pci_find_slot() and pci_find_device() APIs. Most drivers have
been converted over to using the proper hotplug APIs, so this
option serves to include/exclude only a few drivers that are
still using this API.
config PCI_DEBUG
bool "PCI Debugging"
depends on PCI && DEBUG_KERNEL

View file

@ -41,7 +41,7 @@ config HOTPLUG_PCI_FAKE
config HOTPLUG_PCI_COMPAQ
tristate "Compaq PCI Hotplug driver"
depends on X86 && PCI_BIOS
depends on X86 && PCI_BIOS && PCI_LEGACY
help
Say Y here if you have a motherboard with a Compaq PCI Hotplug
controller.
@ -63,7 +63,7 @@ config HOTPLUG_PCI_COMPAQ_NVRAM
config HOTPLUG_PCI_IBM
tristate "IBM PCI Hotplug driver"
depends on X86_IO_APIC && X86 && PCI_BIOS
depends on X86_IO_APIC && X86 && PCI_BIOS && PCI_LEGACY
help
Say Y here if you have a motherboard with a IBM PCI Hotplug
controller.
@ -119,7 +119,7 @@ config HOTPLUG_PCI_CPCI_ZT5550
config HOTPLUG_PCI_CPCI_GENERIC
tristate "Generic port I/O CompactPCI Hotplug driver"
depends on HOTPLUG_PCI_CPCI && X86
depends on HOTPLUG_PCI_CPCI && X86 && PCI_LEGACY
help
Say Y here if you have a CompactPCI system card that exposes the #ENUM
hotswap signal as a bit in a system register that can be read through

View file

@ -113,6 +113,8 @@ pci_find_next_bus(const struct pci_bus *from)
return b;
}
#ifdef CONFIG_PCI_LEGACY
/**
* pci_find_slot - locate PCI device from a given PCI slot
* @bus: number of PCI bus on which desired PCI device resides
@ -137,6 +139,8 @@ pci_find_slot(unsigned int bus, unsigned int devfn)
return NULL;
}
#endif /* CONFIG_PCI_LEGACY */
/**
* pci_get_slot - locate PCI device for a given PCI slot
* @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)
return NULL;
}
#ifdef CONFIG_PCI_LEGACY
/**
* pci_find_subsys - begin or continue searching for a PCI device by vendor/subvendor/device/subdevice id
* @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 *
{
return pci_find_subsys(vendor, device, PCI_ANY_ID, PCI_ANY_ID, from);
}
#endif /* CONFIG_PCI_LEGACY */
/**
* 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)
EXPORT_SYMBOL(pci_dev_present);
EXPORT_SYMBOL(pci_find_present);
#ifdef CONFIG_PCI_LEGACY
EXPORT_SYMBOL(pci_find_device);
EXPORT_SYMBOL(pci_find_slot);
#endif /* CONFIG_PCI_LEGACY */
/* For boot time work */
EXPORT_SYMBOL(pci_find_bus);
EXPORT_SYMBOL(pci_find_next_bus);