]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: timer: Call notifier in the same spinlock
authorTakashi Iwai <tiwai@suse.de>
Wed, 10 Feb 2016 11:47:03 +0000 (12:47 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 12 Feb 2016 14:07:31 +0000 (15:07 +0100)
commit9798d9c2f94c6e01bef1b31f1b13b6e65c2fcd40
tree259de0402441767fba65048fb1ee47de07618266
parentf9b94e265cceb2e2764b9284ed0dda6c8dd83520
ALSA: timer: Call notifier in the same spinlock

snd_timer_notify1() is called outside the spinlock and it retakes the
lock after the unlock.  This is rather racy, and it's safer to move
snd_timer_notify() call inside the main spinlock.

The patch also contains a slight refactoring / cleanup of the code.
Now all start/stop/continue/pause look more symmetric and a bit better
readable.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/timer.c