diff options
Diffstat (limited to 'drivers/pci/pci-acpi.c')
-rw-r--r-- | drivers/pci/pci-acpi.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index 5147c210df52..e4b1fb2c0f5d 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c | |||
@@ -288,6 +288,32 @@ static struct pci_platform_pm_ops acpi_pci_platform_pm = { | |||
288 | .run_wake = acpi_pci_run_wake, | 288 | .run_wake = acpi_pci_run_wake, |
289 | }; | 289 | }; |
290 | 290 | ||
291 | void acpi_pci_add_bus(struct pci_bus *bus) | ||
292 | { | ||
293 | acpi_handle handle = NULL; | ||
294 | |||
295 | if (bus->bridge) | ||
296 | handle = ACPI_HANDLE(bus->bridge); | ||
297 | if (acpi_pci_disabled || handle == NULL) | ||
298 | return; | ||
299 | |||
300 | acpi_pci_slot_enumerate(bus, handle); | ||
301 | acpiphp_enumerate_slots(bus, handle); | ||
302 | } | ||
303 | |||
304 | void acpi_pci_remove_bus(struct pci_bus *bus) | ||
305 | { | ||
306 | /* | ||
307 | * bus->bridge->acpi_node.handle has already been reset to NULL | ||
308 | * when acpi_pci_remove_bus() is called, so don't check ACPI handle. | ||
309 | */ | ||
310 | if (acpi_pci_disabled) | ||
311 | return; | ||
312 | |||
313 | acpiphp_remove_slots(bus); | ||
314 | acpi_pci_slot_remove(bus); | ||
315 | } | ||
316 | |||
291 | /* ACPI bus type */ | 317 | /* ACPI bus type */ |
292 | static int acpi_pci_find_device(struct device *dev, acpi_handle *handle) | 318 | static int acpi_pci_find_device(struct device *dev, acpi_handle *handle) |
293 | { | 319 | { |
@@ -362,7 +388,11 @@ static int __init acpi_pci_init(void) | |||
362 | ret = register_acpi_bus_type(&acpi_pci_bus); | 388 | ret = register_acpi_bus_type(&acpi_pci_bus); |
363 | if (ret) | 389 | if (ret) |
364 | return 0; | 390 | return 0; |
391 | |||
365 | pci_set_platform_pm(&acpi_pci_platform_pm); | 392 | pci_set_platform_pm(&acpi_pci_platform_pm); |
393 | acpi_pci_slot_init(); | ||
394 | acpiphp_init(); | ||
395 | |||
366 | return 0; | 396 | return 0; |
367 | } | 397 | } |
368 | arch_initcall(acpi_pci_init); | 398 | arch_initcall(acpi_pci_init); |