diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2016-02-20 16:18:58 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-02-20 15:45:38 +0100 |
commit | 4fd6c6c7295a50aa9390a3131623456e0c05d8f9 (patch) | |
tree | 250b8c6b5018aa221799cb30507fbf9b0b0dc872 /sound/firewire/bebob/bebob_pcm.c | |
parent | 2a71e701660d7aa9ce1a740588dbf13b975deb10 (diff) |
ALSA: bebob: 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/bebob/bebob_pcm.c')
-rw-r--r-- | sound/firewire/bebob/bebob_pcm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/firewire/bebob/bebob_pcm.c b/sound/firewire/bebob/bebob_pcm.c index 2053d31376df..5d7b9343fa85 100644 --- a/sound/firewire/bebob/bebob_pcm.c +++ b/sound/firewire/bebob/bebob_pcm.c @@ -220,7 +220,7 @@ pcm_capture_hw_params(struct snd_pcm_substream *substream, if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) { mutex_lock(&bebob->mutex); - atomic_inc(&bebob->substreams_counter); + bebob->substreams_counter++; mutex_unlock(&bebob->mutex); } @@ -242,7 +242,7 @@ pcm_playback_hw_params(struct snd_pcm_substream *substream, if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) { mutex_lock(&bebob->mutex); - atomic_inc(&bebob->substreams_counter); + bebob->substreams_counter++; mutex_unlock(&bebob->mutex); } @@ -258,7 +258,7 @@ pcm_capture_hw_free(struct snd_pcm_substream *substream) if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN) { mutex_lock(&bebob->mutex); - atomic_dec(&bebob->substreams_counter); + bebob->substreams_counter--; mutex_unlock(&bebob->mutex); } @@ -273,7 +273,7 @@ pcm_playback_hw_free(struct snd_pcm_substream *substream) if (substream->runtime->status->state != SNDRV_PCM_STATE_OPEN) { mutex_lock(&bebob->mutex); - atomic_dec(&bebob->substreams_counter); + bebob->substreams_counter--; mutex_unlock(&bebob->mutex); } |