Commit 98d36450 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

ACPI: EC: Fold acpi_ec_check_event() into acpi_ec_event_handler()

Because acpi_ec_event_handler() is the only caller of
acpi_ec_check_event() and the separation of these two functions
makes it harder to follow the code flow, fold the latter into the
former (and simplify that code while at it).

No expected functional impact.
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 1f235044
......@@ -1215,24 +1215,6 @@ static int acpi_ec_query(struct acpi_ec *ec)
return result;
}
static void acpi_ec_check_event(struct acpi_ec *ec)
{
unsigned long flags;
if (ec_event_clearing == ACPI_EC_EVT_TIMING_EVENT) {
if (ec_guard(ec)) {
spin_lock_irqsave(&ec->lock, flags);
/*
* Take care of the SCI_EVT unless no one else is
* taking care of it.
*/
if (!ec->curr)
advance_transaction(ec, false);
spin_unlock_irqrestore(&ec->lock, flags);
}
}
}
static void acpi_ec_event_handler(struct work_struct *work)
{
unsigned long flags;
......@@ -1264,7 +1246,15 @@ static void acpi_ec_event_handler(struct work_struct *work)
ec_dbg_evt("Event stopped");
acpi_ec_check_event(ec);
if (ec_event_clearing == ACPI_EC_EVT_TIMING_EVENT && ec_guard(ec)) {
spin_lock_irqsave(&ec->lock, flags);
/* Take care of SCI_EVT unless someone else is doing that. */
if (!ec->curr)
advance_transaction(ec, false);
spin_unlock_irqrestore(&ec->lock, flags);
}
spin_lock_irqsave(&ec->lock, flags);
ec->events_in_progress--;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment