summaryrefslogtreecommitdiff
path: root/sound/firewire/fireworks
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2014-06-04 15:25:32 +0900
committerTakashi Iwai <tiwai@suse.de>2014-06-04 14:35:24 +0200
commitc6e5e741c6dc8e13a47721f419e26e6ac19ecaf4 (patch)
treefa3086fe18bbf74fd126a04e5f869297ffe78a44 /sound/firewire/fireworks
parent21fd3e956ee8a307a06bc6e095f5767a00eb2a7e (diff)
ALSA: fireworks/bebob: Shorten critical section for stream_stop_duplex()
All assignment for local variables in these functions are not related to critical section. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/fireworks')
-rw-r--r--sound/firewire/fireworks/fireworks_stream.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/firewire/fireworks/fireworks_stream.c b/sound/firewire/fireworks/fireworks_stream.c
index 541569022a7c..b985fc5ebdc6 100644
--- a/sound/firewire/fireworks/fireworks_stream.c
+++ b/sound/firewire/fireworks/fireworks_stream.c
@@ -284,8 +284,6 @@ void snd_efw_stream_stop_duplex(struct snd_efw *efw)
struct amdtp_stream *master, *slave;
atomic_t *master_substreams, *slave_substreams;
- mutex_lock(&efw->mutex);
-
if (efw->master == &efw->rx_stream) {
slave = &efw->tx_stream;
master = &efw->rx_stream;
@@ -298,6 +296,8 @@ void snd_efw_stream_stop_duplex(struct snd_efw *efw)
master_substreams = &efw->capture_substreams;
}
+ mutex_lock(&efw->mutex);
+
if (atomic_read(slave_substreams) == 0) {
stop_stream(efw, slave);