Loading drivers/acpi/dock.c +21 −0 Original line number Diff line number Diff line Loading @@ -452,6 +452,25 @@ static inline void complete_undock(struct dock_station *ds) ds->flags &= ~(DOCK_UNDOCKING); } static void dock_lock(struct dock_station *ds, int lock) { struct acpi_object_list arg_list; union acpi_object arg; acpi_status status; arg_list.count = 1; arg_list.pointer = &arg; arg.type = ACPI_TYPE_INTEGER; arg.integer.value = !!lock; status = acpi_evaluate_object(ds->handle, "_LCK", &arg_list, NULL); if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { if (lock) printk(KERN_WARNING PREFIX "Locking device failed\n"); else printk(KERN_WARNING PREFIX "Unlocking device failed\n"); } } /** * dock_in_progress - see if we are in the middle of handling a dock event * @ds: the dock station Loading Loading @@ -577,6 +596,7 @@ static int handle_eject_request(struct dock_station *ds, u32 event) hotplug_dock_devices(ds, ACPI_NOTIFY_EJECT_REQUEST); undock(ds); dock_lock(ds, 0); eject_dock(ds); if (dock_present(ds)) { printk(KERN_ERR PREFIX "Unable to undock!\n"); Loading Loading @@ -617,6 +637,7 @@ static void dock_notify(acpi_handle handle, u32 event, void *data) hotplug_dock_devices(ds, event); complete_dock(ds); dock_event(ds, event, DOCK_EVENT); dock_lock(ds, 1); } break; case ACPI_NOTIFY_DEVICE_CHECK: Loading Loading
drivers/acpi/dock.c +21 −0 Original line number Diff line number Diff line Loading @@ -452,6 +452,25 @@ static inline void complete_undock(struct dock_station *ds) ds->flags &= ~(DOCK_UNDOCKING); } static void dock_lock(struct dock_station *ds, int lock) { struct acpi_object_list arg_list; union acpi_object arg; acpi_status status; arg_list.count = 1; arg_list.pointer = &arg; arg.type = ACPI_TYPE_INTEGER; arg.integer.value = !!lock; status = acpi_evaluate_object(ds->handle, "_LCK", &arg_list, NULL); if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { if (lock) printk(KERN_WARNING PREFIX "Locking device failed\n"); else printk(KERN_WARNING PREFIX "Unlocking device failed\n"); } } /** * dock_in_progress - see if we are in the middle of handling a dock event * @ds: the dock station Loading Loading @@ -577,6 +596,7 @@ static int handle_eject_request(struct dock_station *ds, u32 event) hotplug_dock_devices(ds, ACPI_NOTIFY_EJECT_REQUEST); undock(ds); dock_lock(ds, 0); eject_dock(ds); if (dock_present(ds)) { printk(KERN_ERR PREFIX "Unable to undock!\n"); Loading Loading @@ -617,6 +637,7 @@ static void dock_notify(acpi_handle handle, u32 event, void *data) hotplug_dock_devices(ds, event); complete_dock(ds); dock_event(ds, event, DOCK_EVENT); dock_lock(ds, 1); } break; case ACPI_NOTIFY_DEVICE_CHECK: Loading