Skip to content

Commit 54b8614

Browse files
committed
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>
1 parent 9aa60f3 commit 54b8614

1 file changed

Lines changed: 17 additions & 16 deletions

File tree

drivers/acpi/ec.c

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -451,24 +451,25 @@ static void acpi_ec_submit_event(struct acpi_ec *ec)
451451
if (!acpi_ec_event_enabled(ec))
452452
return;
453453

454-
if (ec->event_state == EC_EVENT_READY) {
455-
ec_dbg_evt("Command(%s) submitted/blocked",
456-
acpi_ec_cmd_string(ACPI_EC_COMMAND_QUERY));
454+
if (ec->event_state != EC_EVENT_READY)
455+
return;
457456

458-
ec->event_state = EC_EVENT_IN_PROGRESS;
459-
/*
460-
* If events_to_process is greqter than 0 at this point, the
461-
* while () loop in acpi_ec_event_handler() is still running
462-
* and incrementing events_to_process will cause it to invoke
463-
* acpi_ec_submit_query() once more, so it is not necessary to
464-
* queue up the event work to start the same loop again.
465-
*/
466-
if (ec->events_to_process++ > 0)
467-
return;
457+
ec_dbg_evt("Command(%s) submitted/blocked",
458+
acpi_ec_cmd_string(ACPI_EC_COMMAND_QUERY));
468459

469-
ec->events_in_progress++;
470-
queue_work(ec_wq, &ec->work);
471-
}
460+
ec->event_state = EC_EVENT_IN_PROGRESS;
461+
/*
462+
* If events_to_process is greater than 0 at this point, the while ()
463+
* loop in acpi_ec_event_handler() is still running and incrementing
464+
* events_to_process will cause it to invoke acpi_ec_submit_query() once
465+
* more, so it is not necessary to queue up the event work to start the
466+
* same loop again.
467+
*/
468+
if (ec->events_to_process++ > 0)
469+
return;
470+
471+
ec->events_in_progress++;
472+
queue_work(ec_wq, &ec->work);
472473
}
473474

474475
static void acpi_ec_complete_event(struct acpi_ec *ec)

0 commit comments

Comments
 (0)