diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2014-06-04 02:25:32 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-06-04 08:35:24 -0400 |
commit | c6e5e741c6dc8e13a47721f419e26e6ac19ecaf4 (patch) | |
tree | fa3086fe18bbf74fd126a04e5f869297ffe78a44 /sound/firewire/fireworks | |
parent | 21fd3e956ee8a307a06bc6e095f5767a00eb2a7e (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.c | 4 |
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) | |||
284 | struct amdtp_stream *master, *slave; | 284 | struct amdtp_stream *master, *slave; |
285 | atomic_t *master_substreams, *slave_substreams; | 285 | atomic_t *master_substreams, *slave_substreams; |
286 | 286 | ||
287 | mutex_lock(&efw->mutex); | ||
288 | |||
289 | if (efw->master == &efw->rx_stream) { | 287 | if (efw->master == &efw->rx_stream) { |
290 | slave = &efw->tx_stream; | 288 | slave = &efw->tx_stream; |
291 | master = &efw->rx_stream; | 289 | master = &efw->rx_stream; |
@@ -298,6 +296,8 @@ void snd_efw_stream_stop_duplex(struct snd_efw *efw) | |||
298 | master_substreams = &efw->capture_substreams; | 296 | master_substreams = &efw->capture_substreams; |
299 | } | 297 | } |
300 | 298 | ||
299 | mutex_lock(&efw->mutex); | ||
300 | |||
301 | if (atomic_read(slave_substreams) == 0) { | 301 | if (atomic_read(slave_substreams) == 0) { |
302 | stop_stream(efw, slave); | 302 | stop_stream(efw, slave); |
303 | 303 | ||