summaryrefslogtreecommitdiffstats
path: root/sound/firewire/fireworks/fireworks_pcm.c
diff options
context:
space:
mode:
authorTakashi Sakamoto2015-11-14 08:54:51 +0100
committerTakashi Iwai2015-11-14 17:53:46 +0100
commit4d2c50a0a9ca75fcd0fd57947fb7b394932e482a (patch)
treeb2986756ef9c825252ec97cc1ffe06fb1c07abb2 /sound/firewire/fireworks/fireworks_pcm.c
parentALSA: fireworks: move mutex from function callees to callers (diff)
downloadkernel-qcow2-linux-4d2c50a0a9ca75fcd0fd57947fb7b394932e482a.tar.gz
kernel-qcow2-linux-4d2c50a0a9ca75fcd0fd57947fb7b394932e482a.tar.xz
kernel-qcow2-linux-4d2c50a0a9ca75fcd0fd57947fb7b394932e482a.zip
ALSA: fireworks: change type of substream counter from atomic_t to unsigned int
The counter is incremented/decremented in critical section protected with mutex. Therefore, no need to use atomic_t. This commit changes the type to unsigned int. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/fireworks/fireworks_pcm.c')
-rw-r--r--sound/firewire/fireworks/fireworks_pcm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/firewire/fireworks/fireworks_pcm.c b/sound/firewire/fireworks/fireworks_pcm.c
index 69f15a6d6f88..f4fbf75ed198 100644
--- a/sound/firewire/fireworks/fireworks_pcm.c
+++ b/sound/firewire/fireworks/fireworks_pcm.c
@@ -253,7 +253,7 @@ static int pcm_capture_hw_params(struct snd_pcm_substream *substream,
if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) {
mutex_lock(&efw->mutex);
- atomic_inc(&efw->capture_substreams);
+ efw->capture_substreams++;
mutex_unlock(&efw->mutex);
}
@@ -274,7 +274,7 @@ static int pcm_playback_hw_params(struct snd_pcm_substream *substream,
if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) {
mutex_lock(&efw->mutex);
- atomic_inc(&efw->playback_substreams);
+ efw->playback_substreams++;
mutex_unlock(&efw->mutex);
}
@@ -289,7 +289,7 @@ static int pcm_capture_hw_free(struct snd_pcm_substream *substream)
if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN) {
mutex_lock(&efw->mutex);
- atomic_dec(&efw->capture_substreams);
+ efw->capture_substreams--;
mutex_unlock(&efw->mutex);
}
@@ -303,7 +303,7 @@ static int pcm_playback_hw_free(struct snd_pcm_substream *substream)
if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN) {
mutex_lock(&efw->mutex);
- atomic_dec(&efw->playback_substreams);
+ efw->playback_substreams--;
mutex_unlock(&efw->mutex);
}