diff options
| author | Rafael J. Wysocki <[email protected]> | 2021-11-23 18:43:05 +0000 |
|---|---|---|
| committer | Rafael J. Wysocki <[email protected]> | 2021-12-01 19:17:32 +0000 |
| commit | c793570d8725e44b64dbe466eb8ecda34c5eb8ac (patch) | |
| tree | 83097b94fee9e1585cb8d42a68a16bf5b2ba37c1 /drivers/acpi/internal.h | |
| parent | ACPI: EC: Rename three functions (diff) | |
| download | kernel-c793570d8725e44b64dbe466eb8ecda34c5eb8ac.tar.gz kernel-c793570d8725e44b64dbe466eb8ecda34c5eb8ac.zip | |
ACPI: EC: Avoid queuing unnecessary work in acpi_ec_submit_event()
Notice that it is not necessary to queue up the event work again
if the while () loop in acpi_ec_event_handler() is still running
which is the case if nr_pending_queries is greater than 0 at the
beginning of acpi_ec_submit_event() and modify the code to avoid
doing that.
While at it, rename nr_pending_queries in struct acpi_ec to
events_to_process which actually matches the role of that field
and change its data type to unsigned int which is sufficient.
No expected functional impact.
Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'drivers/acpi/internal.h')
| -rw-r--r-- | drivers/acpi/internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h index 54b2be94d23d..de546be3bc6a 100644 --- a/drivers/acpi/internal.h +++ b/drivers/acpi/internal.h @@ -182,7 +182,7 @@ struct acpi_ec { spinlock_t lock; struct work_struct work; unsigned long timestamp; - unsigned long nr_pending_queries; + unsigned int events_to_process; unsigned int events_in_progress; unsigned int queries_in_progress; bool busy_polling; |
