diff options
Diffstat (limited to 'drivers/acpi/pci_root.c')
-rw-r--r-- | drivers/acpi/pci_root.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 20360e480bd8..5b01bd6d5ea0 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c | |||
@@ -599,7 +599,9 @@ static int acpi_pci_root_add(struct acpi_device *device, | |||
599 | pci_assign_unassigned_root_bus_resources(root->bus); | 599 | pci_assign_unassigned_root_bus_resources(root->bus); |
600 | } | 600 | } |
601 | 601 | ||
602 | pci_lock_rescan_remove(); | ||
602 | pci_bus_add_devices(root->bus); | 603 | pci_bus_add_devices(root->bus); |
604 | pci_unlock_rescan_remove(); | ||
603 | return 1; | 605 | return 1; |
604 | 606 | ||
605 | end: | 607 | end: |
@@ -611,6 +613,8 @@ static void acpi_pci_root_remove(struct acpi_device *device) | |||
611 | { | 613 | { |
612 | struct acpi_pci_root *root = acpi_driver_data(device); | 614 | struct acpi_pci_root *root = acpi_driver_data(device); |
613 | 615 | ||
616 | pci_lock_rescan_remove(); | ||
617 | |||
614 | pci_stop_root_bus(root->bus); | 618 | pci_stop_root_bus(root->bus); |
615 | 619 | ||
616 | device_set_run_wake(root->bus->bridge, false); | 620 | device_set_run_wake(root->bus->bridge, false); |
@@ -618,6 +622,8 @@ static void acpi_pci_root_remove(struct acpi_device *device) | |||
618 | 622 | ||
619 | pci_remove_root_bus(root->bus); | 623 | pci_remove_root_bus(root->bus); |
620 | 624 | ||
625 | pci_unlock_rescan_remove(); | ||
626 | |||
621 | kfree(root); | 627 | kfree(root); |
622 | } | 628 | } |
623 | 629 | ||