summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/pci_root.c
diff options
context:
space:
mode:
authorJiang Liu <jiang.liu@huawei.com>2012-09-18 15:20:34 +0900
committerBjorn Helgaas <bhelgaas@google.com>2012-09-24 15:29:40 -0600
commitc8e9afb124f61e0c9901801f4c95ae4208bd4536 (patch)
treebf4fa40246ba7d32e193503ec4c7e935914ea27e /drivers/acpi/pci_root.c
parent8ee5bdf3e9c99808bf271aa5cc41d689e6d9d3eb (diff)
downloadblackbird-op-linux-c8e9afb124f61e0c9901801f4c95ae4208bd4536.tar.gz
blackbird-op-linux-c8e9afb124f61e0c9901801f4c95ae4208bd4536.zip
PCI/ACPI: Notify acpi_pci_drivers when hot-plugging PCI root bridges
When hot-plugging PCI root bridge, acpi_pci_drivers' add()/remove() methods should be invoked to notify registered drivers. Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/acpi/pci_root.c')
-rw-r--r--drivers/acpi/pci_root.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 68d679e21248..4bec13d9c2bf 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -626,14 +626,25 @@ end:
static int acpi_pci_root_start(struct acpi_device *device)
{
struct acpi_pci_root *root = acpi_driver_data(device);
+ struct acpi_pci_driver *driver;
+
+ list_for_each_entry(driver, &acpi_pci_drivers, node)
+ if (driver->add)
+ driver->add(device->handle);
pci_bus_add_devices(root->bus);
+
return 0;
}
static int acpi_pci_root_remove(struct acpi_device *device, int type)
{
struct acpi_pci_root *root = acpi_driver_data(device);
+ struct acpi_pci_driver *driver;
+
+ list_for_each_entry(driver, &acpi_pci_drivers, node)
+ if (driver->remove)
+ driver->remove(root->device->handle);
device_set_run_wake(root->bus->bridge, false);
pci_acpi_remove_bus_pm_notifier(device);
OpenPOWER on IntegriCloud