Merge tag 'pci-v3.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
[linux-3.10.git] / drivers / pci / hotplug / sgi_hotplug.c
index 180e760..b2781df 100644 (file)
@@ -422,6 +422,7 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot)
                        pdevice = NULL;
                }
 
+               acpi_scan_lock_acquire();
                /*
                 * Walk the rootbus node's immediate children looking for
                 * the slot's device node(s). There can be more than
@@ -455,6 +456,7 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot)
                                }
                        }
                }
+               acpi_scan_lock_release();
        }
 
        /* Call the driver for the new device */
@@ -504,6 +506,7 @@ static int disable_slot(struct hotplug_slot *bss_hotplug_slot)
                /* Get the rootbus node pointer */
                phandle = PCI_CONTROLLER(slot->pci_bus)->acpi_handle;
 
+               acpi_scan_lock_acquire();
                /*
                 * Walk the rootbus node's immediate children looking for
                 * the slot's device node(s). There can be more than
@@ -534,7 +537,7 @@ static int disable_slot(struct hotplug_slot *bss_hotplug_slot)
                                        acpi_bus_trim(device);
                        }
                }
-
+               acpi_scan_lock_release();
        }
 
        /* Free the SN resources assigned to the Linux device.*/