From 3b074a650e766b7b142d32803eac169a428ce9dc Mon Sep 17 00:00:00 2001 From: Jiang Liu Date: Fri, 12 Apr 2013 05:44:21 +0000 Subject: [PATCH] --- yaml --- r: 362877 b: refs/heads/master c: 5090d4a6a1f150ec593ac5f2a755b5a3e878b21e h: refs/heads/master i: 362875: 281163c94cc5a4986739137214be19615c07b0d4 v: v3 --- [refs] | 2 +- trunk/drivers/pci/pci-acpi.c | 24 ++++++++++++++++++++++++ trunk/include/linux/pci-acpi.h | 8 +++++++- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 78486a580879..620e1e6d923a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 10a9574756201fbbdd0cac11f370f00d3d02bfa1 +refs/heads/master: 5090d4a6a1f150ec593ac5f2a755b5a3e878b21e diff --git a/trunk/drivers/pci/pci-acpi.c b/trunk/drivers/pci/pci-acpi.c index dee5dddaa292..b8b8437c703e 100644 --- a/trunk/drivers/pci/pci-acpi.c +++ b/trunk/drivers/pci/pci-acpi.c @@ -287,6 +287,30 @@ static struct pci_platform_pm_ops acpi_pci_platform_pm = { .run_wake = acpi_pci_run_wake, }; +void acpi_pci_add_bus(struct pci_bus *bus) +{ + acpi_handle handle = NULL; + + if (bus->bridge) + handle = ACPI_HANDLE(bus->bridge); + if (acpi_pci_disabled || handle == NULL) + return; + + /* TODO: add PCI slots and acpiphp hotplug slots */ +} + +void acpi_pci_remove_bus(struct pci_bus *bus) +{ + /* + * bus->bridge->acpi_node.handle has already been reset to NULL + * when acpi_pci_remove_bus() is called, so don't check ACPI handle. + */ + if (acpi_pci_disabled) + return; + + /* TODO: remove PCI slots and acpiphp hotplug slots */ +} + /* ACPI bus type */ static int acpi_pci_find_device(struct device *dev, acpi_handle *handle) { diff --git a/trunk/include/linux/pci-acpi.h b/trunk/include/linux/pci-acpi.h index 9a22b5efb384..2b1743cc3186 100644 --- a/trunk/include/linux/pci-acpi.h +++ b/trunk/include/linux/pci-acpi.h @@ -41,7 +41,13 @@ static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) return DEVICE_ACPI_HANDLE(dev); } -#endif + +void acpi_pci_add_bus(struct pci_bus *bus); +void acpi_pci_remove_bus(struct pci_bus *bus); +#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) { } +#endif /* CONFIG_ACPI */ #ifdef CONFIG_ACPI_APEI extern bool aer_acpi_firmware_first(void);