ALSA: pcm: Simplify snd_pcm_action_lock_irq()
authorTakashi Iwai <tiwai@suse.de>
Fri, 31 Oct 2014 13:45:04 +0000 (14:45 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 31 Oct 2014 14:27:02 +0000 (15:27 +0100)
commite3a4bd5eec52912108e287146052f2624acbec7a
treee45d0a4fc4ec9701079a840b8986e0f9b6af1ef8
parent4c41421657a3760056976fd517e7e6b3615febb3
ALSA: pcm: Simplify snd_pcm_action_lock_irq()

The function snd_pcm_action_lock_irq() can be much simplified by
simply wrapping snd_pcm_action() with the stream lock.  This was
rather the original idea, but later it was open coded for
optimization.  However, looking at the optimization part closely, one
notices that the probability of the optimized path is quite low; in
normal situations, the linked stream action happens only for the
triggered substream, thus the operation becomes identical.  So the
code simplification has a clear win, especially because we have now
doubly codes for both atomic and non-atomic locks.

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