diff options
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 896a13bf2e02..27abd501c258 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
@@ -491,20 +491,6 @@ static unsigned char acpiphp_max_busnr(struct pci_bus *bus) | |||
491 | return max; | 491 | return max; |
492 | } | 492 | } |
493 | 493 | ||
494 | /** | ||
495 | * acpiphp_bus_add - Scan ACPI namespace subtree. | ||
496 | * @handle: ACPI object handle to start the scan from. | ||
497 | */ | ||
498 | static void acpiphp_bus_add(acpi_handle handle) | ||
499 | { | ||
500 | struct acpi_device *adev = NULL; | ||
501 | |||
502 | acpi_bus_scan(handle); | ||
503 | acpi_bus_get_device(handle, &adev); | ||
504 | if (acpi_device_enumerated(adev)) | ||
505 | acpi_device_set_power(adev, ACPI_STATE_D0); | ||
506 | } | ||
507 | |||
508 | static void acpiphp_set_acpi_region(struct acpiphp_slot *slot) | 494 | static void acpiphp_set_acpi_region(struct acpiphp_slot *slot) |
509 | { | 495 | { |
510 | struct acpiphp_func *func; | 496 | struct acpiphp_func *func; |
@@ -544,9 +530,13 @@ static int acpiphp_rescan_slot(struct acpiphp_slot *slot) | |||
544 | { | 530 | { |
545 | struct acpiphp_func *func; | 531 | struct acpiphp_func *func; |
546 | 532 | ||
547 | list_for_each_entry(func, &slot->funcs, sibling) | 533 | list_for_each_entry(func, &slot->funcs, sibling) { |
548 | acpiphp_bus_add(func_to_handle(func)); | 534 | struct acpi_device *adev = func_to_acpi_device(func); |
549 | 535 | ||
536 | acpi_bus_scan(adev->handle); | ||
537 | if (acpi_device_enumerated(adev)) | ||
538 | acpi_device_set_power(adev, ACPI_STATE_D0); | ||
539 | } | ||
550 | return pci_scan_slot(slot->bus, PCI_DEVFN(slot->device, 0)); | 540 | return pci_scan_slot(slot->bus, PCI_DEVFN(slot->device, 0)); |
551 | } | 541 | } |
552 | 542 | ||