ASoC: rt5663: add cancel_delayed_work_sync when system suspends
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · Shuming [范書銘]
Quoted 7 lines
Review
Quoted 4 lines
This patch makes sure that the workqueue is completed before the system
(quoted diff) +2
-0+ cancel_delayed_work_sync(&rt5663->jack_detect_work); + cancel_delayed_work_sync(&rt5663->jd_unplug_work);Does something ensure that no more interrupts can fire after the work is cancelled?
As I knew, the JD source is not the wake-up source when the system suspends. This patch just makes sure the work is done to avoid the unexpected problem.
The issue isn't unexpected wakes - it's if the work manages to start running again before the system suspends. For example if a jack detect interrupt is triggered while processing the second cancel there then the jack_detect_work will be rescheduled during suspend. Interrupts will still be active until a reasonable time later in the suspend process.