summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_dock.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/acpica/acpi_dock.c')
-rw-r--r--sys/dev/acpica/acpi_dock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/acpica/acpi_dock.c b/sys/dev/acpica/acpi_dock.c
index b7d2e3e..95b9fae 100644
--- a/sys/dev/acpica/acpi_dock.c
+++ b/sys/dev/acpica/acpi_dock.c
@@ -188,12 +188,12 @@ acpi_dock_attach_later(void *context)
dev = (device_t)context;
+ newbus_xlock();
if (!device_is_enabled(dev))
device_enable(dev);
- mtx_lock(&Giant);
device_probe_and_attach(dev);
- mtx_unlock(&Giant);
+ newbus_xunlock();
}
static ACPI_STATUS
@@ -299,11 +299,11 @@ acpi_dock_eject_child(ACPI_HANDLE handle, UINT32 level, void *context,
"ejecting device for %s\n", acpi_name(handle));
dev = acpi_get_device(handle);
+ newbus_xlock();
if (dev != NULL && device_is_attached(dev)) {
- mtx_lock(&Giant);
device_detach(dev);
- mtx_unlock(&Giant);
}
+ newbus_xunlock();
acpi_SetInteger(handle, "_EJ0", 0);
out:
OpenPOWER on IntegriCloud