diff options
| author | Viresh Kumar <[email protected]> | 2019-03-08 09:53:11 +0000 |
|---|---|---|
| committer | Rafael J. Wysocki <[email protected]> | 2019-03-12 08:40:48 +0000 |
| commit | 1fad17fb1bbcd73159c2b992668a6957ecc5af8a (patch) | |
| tree | 9d1a61b0ac467950e8f6d7c4205de35bda10fe96 /drivers/fpga/fpga-mgr.c | |
| parent | Merge tag 'pm-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafae... (diff) | |
| download | kernel-1fad17fb1bbcd73159c2b992668a6957ecc5af8a.tar.gz kernel-1fad17fb1bbcd73159c2b992668a6957ecc5af8a.zip | |
PM / wakeup: Rework wakeup source timer cancellation
If wakeup_source_add() is called right after wakeup_source_remove()
for the same wakeup source, timer_setup() may be called for a
potentially scheduled timer which is incorrect.
To avoid that, move the wakeup source timer cancellation from
wakeup_source_drop() to wakeup_source_remove().
Moreover, make wakeup_source_remove() clear the timer function after
canceling the timer to let wakeup_source_not_registered() treat
unregistered wakeup sources in the same way as the ones that have
never been registered.
Signed-off-by: Viresh Kumar <[email protected]>
Cc: 4.4+ <[email protected]> # 4.4+
[ rjw: Subject, changelog, merged two patches together ]
Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
0 files changed, 0 insertions, 0 deletions
