mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
PCI/ACPI: Handle PCI slot devices when creating/destroying PCI buses
Currently the pci_slot driver doesn't update PCI slot devices when PCI device hotplug event happens, which may cause memory leak and returning stale information to user. Now the pci_slot driver has been changed as built-in driver, so invoke PCI slot enumeration and destroy routines directly from the PCI core. And remove ACPI PCI sub-driver related code because it isn't needed any more. [bhelgas: removed "extern" from function declarations] Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Signed-off-by: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Yinghai Lu <yinghai@kernel.org> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Cc: Toshi Kani <toshi.kani@hp.com>
This commit is contained in:
parent
89016506b6
commit
5c0b04e3d9
4 changed files with 41 additions and 149 deletions
|
@ -44,6 +44,18 @@ static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus)
|
|||
|
||||
void acpi_pci_add_bus(struct pci_bus *bus);
|
||||
void acpi_pci_remove_bus(struct pci_bus *bus);
|
||||
|
||||
#ifdef CONFIG_ACPI_PCI_SLOT
|
||||
void acpi_pci_slot_init(void);
|
||||
void acpi_pci_slot_enumerate(struct pci_bus *bus, acpi_handle handle);
|
||||
void acpi_pci_slot_remove(struct pci_bus *bus);
|
||||
#else
|
||||
static inline void acpi_pci_slot_init(void) { }
|
||||
static inline void acpi_pci_slot_enumerate(struct pci_bus *bus,
|
||||
acpi_handle handle) { }
|
||||
static inline void acpi_pci_slot_remove(struct pci_bus *bus) { }
|
||||
#endif
|
||||
|
||||
#else /* CONFIG_ACPI */
|
||||
static inline void acpi_pci_add_bus(struct pci_bus *bus) { }
|
||||
static inline void acpi_pci_remove_bus(struct pci_bus *bus) { }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue