summaryrefslogtreecommitdiff
path: root/drivers/acpi/ec.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r--drivers/acpi/ec.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 391f331674c7..fe086ca0a183 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -573,8 +573,22 @@ static u32 acpi_ec_gpe_handler(void *data)
if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) {
gpe_transaction(ec, status);
if (ec_transaction_done(ec) &&
- (status & ACPI_EC_FLAG_IBF) == 0)
+ (status & ACPI_EC_FLAG_IBF) == 0) {
+
+#ifndef CONFIG_PREEMPT_RT
wake_up(&ec->wait);
+#else
+ // hack ...
+ if (waitqueue_active(&ec->wait)) {
+ struct task_struct *task;
+
+ task = list_entry(ec->wait.task_list.next,
+ wait_queue_t, task_list)->private;
+ if (task)
+ wake_up_process(task);
+ }
+#endif
+ }
}
ec_check_sci(ec, status);