Commit e91f8c5
committed
ACPI: button: Call device_init_wakeup() earlier during probe
Calling device_init_wakeup() after installing a notify handler in which
wakeup events are signaled may cause a wakeup event to be missed if the
device is probed right before a system suspend.
To avoid this, move the device_init_wakeup() call in acpi_button_probe()
before the notify handler installation and add a corresponding cleanup
to the error path.
Also carry out wakeup cleanup for the button in acpi_button_remove()
because after that point the notify handler will not run for it and
wakeup events coming from it will not be signaled.
Fixes: 0d51157 ("ACPI: button: Eliminate the driver notify callback")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/12854922.O9o76ZdvQC@rafael.j.wysocki1 parent d84e173 commit e91f8c5
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
625 | 625 | | |
626 | 626 | | |
627 | 627 | | |
| 628 | + | |
| 629 | + | |
628 | 630 | | |
629 | 631 | | |
630 | 632 | | |
| |||
655 | 657 | | |
656 | 658 | | |
657 | 659 | | |
658 | | - | |
659 | 660 | | |
660 | 661 | | |
661 | 662 | | |
662 | 663 | | |
| 664 | + | |
663 | 665 | | |
664 | 666 | | |
665 | 667 | | |
| |||
691 | 693 | | |
692 | 694 | | |
693 | 695 | | |
| 696 | + | |
| 697 | + | |
694 | 698 | | |
695 | 699 | | |
696 | 700 | | |
| |||
0 commit comments