ACPI: EC: Do not return result from advance_transaction()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 4 Feb 2022 17:40:20 +0000 (18:40 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 14 Feb 2022 19:14:40 +0000 (20:14 +0100)
commit9aa60f3cbafb0facc15a6114df7616a1bf23a88d
tree7e343e0314664452e4e52e037ee838ef4459f37a
parent977dc3082285206e7b1fcbc4496671194cfb7980
ACPI: EC: Do not return result from advance_transaction()

Notice that the if the event state is EC_EVENT_READY, the event
handling work cannot be pending, so it is not necessary to check
the return value of queue_work() in acpi_ec_submit_event().
Moreover, whether or not there is any EC work pending at the
moment can always be checked by looking at the events_in_progress
and queries_in_progress counters, so acpi_ec_submit_event() and
consequently advance_transaction() need not return results.

Accordingly, make acpi_ec_dispatch_gpe() always use the counters
mentioned above (for first_ec) to check if there is any pending EC
work to flush and turn both acpi_ec_submit_event() and
advance_transaction() into void functions (again, because they were
void functions in the past).

While at it, add a clarifying comment about the acpi_ec_mask_events()
call in advance_transaction().

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/ec.c