diff options
author | Jiang Liu <liuj97@gmail.com> | 2013-04-12 01:44:24 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-04-12 17:38:25 -0400 |
commit | 5c0b04e3d913c91aee6e48e567e20a3f67849618 (patch) | |
tree | 04abbfcaeb1ada556460702b55fd24ffd349127e /include/linux/pci-acpi.h | |
parent | 89016506b62a79766c091959ecb40ec666f381bc (diff) |
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>
Diffstat (limited to 'include/linux/pci-acpi.h')
-rw-r--r-- | include/linux/pci-acpi.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index 2b1743cc3186..23cd40abba4f 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h | |||
@@ -44,6 +44,18 @@ static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) | |||
44 | 44 | ||
45 | void acpi_pci_add_bus(struct pci_bus *bus); | 45 | void acpi_pci_add_bus(struct pci_bus *bus); |
46 | void acpi_pci_remove_bus(struct pci_bus *bus); | 46 | void acpi_pci_remove_bus(struct pci_bus *bus); |
47 | |||
48 | #ifdef CONFIG_ACPI_PCI_SLOT | ||
49 | void acpi_pci_slot_init(void); | ||
50 | void acpi_pci_slot_enumerate(struct pci_bus *bus, acpi_handle handle); | ||
51 | void acpi_pci_slot_remove(struct pci_bus *bus); | ||
52 | #else | ||
53 | static inline void acpi_pci_slot_init(void) { } | ||
54 | static inline void acpi_pci_slot_enumerate(struct pci_bus *bus, | ||
55 | acpi_handle handle) { } | ||
56 | static inline void acpi_pci_slot_remove(struct pci_bus *bus) { } | ||
57 | #endif | ||
58 | |||
47 | #else /* CONFIG_ACPI */ | 59 | #else /* CONFIG_ACPI */ |
48 | static inline void acpi_pci_add_bus(struct pci_bus *bus) { } | 60 | static inline void acpi_pci_add_bus(struct pci_bus *bus) { } |
49 | static inline void acpi_pci_remove_bus(struct pci_bus *bus) { } | 61 | static inline void acpi_pci_remove_bus(struct pci_bus *bus) { } |