Commit c793570
committed
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 <rafael.j.wysocki@intel.com>1 parent eafe750 commit c793570
2 files changed
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
456 | | - | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
457 | 466 | | |
458 | 467 | | |
459 | 468 | | |
| |||
665 | 674 | | |
666 | 675 | | |
667 | 676 | | |
668 | | - | |
| 677 | + | |
669 | 678 | | |
670 | 679 | | |
671 | 680 | | |
| |||
1223 | 1232 | | |
1224 | 1233 | | |
1225 | 1234 | | |
1226 | | - | |
| 1235 | + | |
1227 | 1236 | | |
1228 | 1237 | | |
1229 | 1238 | | |
1230 | 1239 | | |
1231 | 1240 | | |
1232 | | - | |
| 1241 | + | |
1233 | 1242 | | |
1234 | 1243 | | |
1235 | 1244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
0 commit comments