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>
This commit is contained in:
@ -451,24 +451,25 @@ static void acpi_ec_submit_event(struct acpi_ec *ec)
|
|||||||
if (!acpi_ec_event_enabled(ec))
|
if (!acpi_ec_event_enabled(ec))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ec->event_state == EC_EVENT_READY) {
|
if (ec->event_state != EC_EVENT_READY)
|
||||||
ec_dbg_evt("Command(%s) submitted/blocked",
|
return;
|
||||||
acpi_ec_cmd_string(ACPI_EC_COMMAND_QUERY));
|
|
||||||
|
|
||||||
ec->event_state = EC_EVENT_IN_PROGRESS;
|
ec_dbg_evt("Command(%s) submitted/blocked",
|
||||||
/*
|
acpi_ec_cmd_string(ACPI_EC_COMMAND_QUERY));
|
||||||
* 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->events_in_progress++;
|
ec->event_state = EC_EVENT_IN_PROGRESS;
|
||||||
queue_work(ec_wq, &ec->work);
|
/*
|
||||||
}
|
* 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)
|
static void acpi_ec_complete_event(struct acpi_ec *ec)
|
||||||
|
Reference in New Issue
Block a user