]> git.baikalelectronics.ru Git - kernel.git/commit
sound: oss: dmasound: kill SLEEP() macro to avoid race
authorArnd Bergmann <arnd@arndb.de>
Thu, 2 Jan 2014 12:07:50 +0000 (13:07 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 14 Jan 2014 15:12:07 +0000 (16:12 +0100)
commit2f84118c07c2f0cd94a0305988f29d736a2aea56
tree0efe9224215eca736bbf6a06538651eb54b9516f
parentaec68e1a3055eeae1dc0281c737610eb9169eda4
sound: oss: dmasound: kill SLEEP() macro to avoid race

The use of interruptible_sleep_on_timeout in the dmasound driver
is questionable and we want to kill off all sleep_on variants.
This replaces the calls with wait_event_interruptible_timeout
where possible, to wait for a particular event instead of blocking
in a racy way. In the sq_write function, the easiest solution is
an open-coded prepare_to_wait loop.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/oss/dmasound/dmasound.h
sound/oss/dmasound/dmasound_core.c