Commit 9ba33f6
committed
Input: zforce_ts - ensure that pm_stay_awake() and pm_relax() are balanced
There is a small chance that ts->suspending flag may change while the
interrupt handler is running. To make sure call to pm_relax() is not
skipped on accident use a temporary to hold the original value at the
beginning of interrupt. Use READ_ONCE() so that the value is actually
fetched at the right time.
Tested-by: Andreas Kemnade <[email protected]> # Tolino Shine2HD
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>1 parent f388412 commit 9ba33f6
1 file changed
+11
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
| 457 | + | |
457 | 458 | | |
458 | 459 | | |
459 | 460 | | |
| |||
467 | 468 | | |
468 | 469 | | |
469 | 470 | | |
470 | | - | |
| 471 | + | |
| 472 | + | |
471 | 473 | | |
472 | 474 | | |
473 | 475 | | |
| |||
495 | 497 | | |
496 | 498 | | |
497 | 499 | | |
498 | | - | |
| 500 | + | |
499 | 501 | | |
500 | 502 | | |
501 | 503 | | |
| |||
548 | 550 | | |
549 | 551 | | |
550 | 552 | | |
551 | | - | |
| 553 | + | |
552 | 554 | | |
553 | 555 | | |
554 | 556 | | |
| |||
584 | 586 | | |
585 | 587 | | |
586 | 588 | | |
587 | | - | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
588 | 592 | | |
589 | 593 | | |
590 | 594 | | |
| |||
615 | 619 | | |
616 | 620 | | |
617 | 621 | | |
618 | | - | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
619 | 625 | | |
620 | 626 | | |
621 | 627 | | |
| |||
0 commit comments