diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-02-04 18:40:55 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-02-14 20:14:40 +0100 |
commit | 54b86141d71db2a16743cfa4a3417180d7feb24a (patch) | |
tree | 0db51e2c57909b4d15ff0adb322a9d0de7b6b025 /drivers/acpi/ec.c | |
parent | 9aa60f3cbafb0facc15a6114df7616a1bf23a88d (diff) | |
download | linux-stable-54b86141d71db2a16743cfa4a3417180d7feb24a.tar.gz linux-stable-54b86141d71db2a16743cfa4a3417180d7feb24a.tar.bz2 linux-stable-54b86141d71db2a16743cfa4a3417180d7feb24a.zip |
ACPI: EC: Reduce indentation level in acpi_ec_submit_event()
The indentation level in acpi_ec_submit_event() can be reduced, so
do that and while at it fix a typo in the comment affected by that
change.
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r-- | drivers/acpi/ec.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index e202c0c370b1..bba96df3b88a 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -451,24 +451,25 @@ static void acpi_ec_submit_event(struct acpi_ec *ec) if (!acpi_ec_event_enabled(ec)) return; - if (ec->event_state == EC_EVENT_READY) { - ec_dbg_evt("Command(%s) submitted/blocked", - acpi_ec_cmd_string(ACPI_EC_COMMAND_QUERY)); + if (ec->event_state != EC_EVENT_READY) + return; - ec->event_state = EC_EVENT_IN_PROGRESS; - /* - * If events_to_process is greqter than 0 at this point, the - * while () loop in acpi_ec_event_handler() is still running - * and incrementing events_to_process will cause it to invoke - * acpi_ec_submit_query() once more, so it is not necessary to - * queue up the event work to start the same loop again. - */ - if (ec->events_to_process++ > 0) - return; + ec_dbg_evt("Command(%s) submitted/blocked", + acpi_ec_cmd_string(ACPI_EC_COMMAND_QUERY)); - ec->events_in_progress++; - queue_work(ec_wq, &ec->work); - } + ec->event_state = EC_EVENT_IN_PROGRESS; + /* + * If events_to_process is greater than 0 at this point, the while () + * loop in acpi_ec_event_handler() is still running and incrementing + * events_to_process will cause it to invoke acpi_ec_submit_query() once + * more, so it is not necessary to queue up the event work to start the + * same loop again. + */ + if (ec->events_to_process++ > 0) + return; + + ec->events_in_progress++; + queue_work(ec_wq, &ec->work); } static void acpi_ec_complete_event(struct acpi_ec *ec) |