diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-12-13 17:14:35 +0100 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-02-15 10:33:03 -0600 |
commit | 76ff2fdb5e6510387208aa07094c2eb00a64eb73 (patch) | |
tree | 764270696f99039b3f0dc7d0893cd3f66a5331a5 /drivers | |
parent | c8e451704e219731d67bfd66ce15fca9952124e9 (diff) |
acpi-gpe-use-wait-simple.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/ec.c | 8 | ||||
-rw-r--r-- | drivers/acpi/internal.h | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 5812e01fc7e5..db0e6c3b28fd 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -222,7 +222,7 @@ static int ec_poll(struct acpi_ec *ec) if (ec_transaction_done(ec)) return 0; } else { - if (wait_event_timeout(ec->wait, + if (swait_event_timeout(ec->wait, ec_transaction_done(ec), msecs_to_jiffies(1))) return 0; @@ -272,7 +272,7 @@ static int ec_wait_ibf0(struct acpi_ec *ec) unsigned long delay = jiffies + msecs_to_jiffies(ec_delay); /* interrupt wait manually if GPE mode is not active */ while (time_before(jiffies, delay)) - if (wait_event_timeout(ec->wait, ec_check_ibf0(ec), + if (swait_event_timeout(ec->wait, ec_check_ibf0(ec), msecs_to_jiffies(1))) return 0; return -ETIME; @@ -612,7 +612,7 @@ static u32 acpi_ec_gpe_handler(acpi_handle gpe_device, advance_transaction(ec, acpi_ec_read_status(ec)); if (ec_transaction_done(ec) && (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) == 0) { - wake_up(&ec->wait); + swait_wake(&ec->wait); ec_check_sci(ec, acpi_ec_read_status(ec)); } return ACPI_INTERRUPT_HANDLED | ACPI_REENABLE_GPE; @@ -676,7 +676,7 @@ static struct acpi_ec *make_acpi_ec(void) return NULL; ec->flags = 1 << EC_FLAGS_QUERY_PENDING; mutex_init(&ec->lock); - init_waitqueue_head(&ec->wait); + init_swait_head(&ec->wait); INIT_LIST_HEAD(&ec->list); raw_spin_lock_init(&ec->curr_lock); return ec; diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h index 68ed95f4db5e..2519b6ec2666 100644 --- a/drivers/acpi/internal.h +++ b/drivers/acpi/internal.h @@ -23,6 +23,8 @@ #define PREFIX "ACPI: " +#include <linux/wait-simple.h> + int init_acpi_device_notify(void); int acpi_scan_init(void); int acpi_sysfs_init(void); @@ -59,7 +61,7 @@ struct acpi_ec { unsigned long global_lock; unsigned long flags; struct mutex lock; - wait_queue_head_t wait; + struct swait_head wait; struct list_head list; struct transaction *curr; raw_spinlock_t curr_lock; |