]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: timer: Check ack_list emptiness instead of bit flag
authorTakashi Iwai <tiwai@suse.de>
Wed, 27 Mar 2019 15:56:08 +0000 (16:56 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 27 Mar 2019 15:56:08 +0000 (16:56 +0100)
commitce7941162892e2fddf43ff0451b6c13a9ee74941
tree14e736023f0b244cb7846bf67ac661b13667775a
parent19521132338e66aeb0a4c94ab09eef96a868fb59
ALSA: timer: Check ack_list emptiness instead of bit flag

For checking the pending timer instance that is still left on the
timer object that is being closed, we set/clear a bit flag
SNDRV_TIMER_IFLG_CALLBACK around the call of callbacks.  This can be
simplified by replace with the list_empty() call for ti->ack_list.
This covers the existence more comprehensively and safely.

A gratis bonus is that we can get rid of SNDRV_TIMER_IFLG_CALLBACK bit
flag definition as well.

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