diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2016-02-20 08:18:58 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-02-20 15:45:38 +0100 |
commit | 4fd6c6c7295a50aa9390a3131623456e0c05d8f9 (patch) | |
tree | 250b8c6b5018aa221799cb30507fbf9b0b0dc872 /sound/firewire/bebob/bebob_midi.c | |
parent | ALSA: bebob: move mutex from function callee to callers (diff) | |
download | linux-4fd6c6c7295a50aa9390a3131623456e0c05d8f9.tar.xz linux-4fd6c6c7295a50aa9390a3131623456e0c05d8f9.zip |
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_midi.c')
-rw-r--r-- | sound/firewire/bebob/bebob_midi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/firewire/bebob/bebob_midi.c b/sound/firewire/bebob/bebob_midi.c index cb1b385b3551..868eb0decbec 100644 --- a/sound/firewire/bebob/bebob_midi.c +++ b/sound/firewire/bebob/bebob_midi.c @@ -18,7 +18,7 @@ static int midi_capture_open(struct snd_rawmidi_substream *substream) goto end; mutex_lock(&bebob->mutex); - atomic_inc(&bebob->substreams_counter); + bebob->substreams_counter++; err = snd_bebob_stream_start_duplex(bebob, 0); mutex_unlock(&bebob->mutex); if (err < 0) @@ -37,7 +37,7 @@ static int midi_playback_open(struct snd_rawmidi_substream *substream) goto end; mutex_lock(&bebob->mutex); - atomic_inc(&bebob->substreams_counter); + bebob->substreams_counter++; err = snd_bebob_stream_start_duplex(bebob, 0); mutex_unlock(&bebob->mutex); if (err < 0) @@ -51,7 +51,7 @@ static int midi_capture_close(struct snd_rawmidi_substream *substream) struct snd_bebob *bebob = substream->rmidi->private_data; mutex_lock(&bebob->mutex); - atomic_dec(&bebob->substreams_counter); + bebob->substreams_counter--; snd_bebob_stream_stop_duplex(bebob); mutex_unlock(&bebob->mutex); @@ -64,7 +64,7 @@ static int midi_playback_close(struct snd_rawmidi_substream *substream) struct snd_bebob *bebob = substream->rmidi->private_data; mutex_lock(&bebob->mutex); - atomic_dec(&bebob->substreams_counter); + bebob->substreams_counter--; snd_bebob_stream_stop_duplex(bebob); mutex_unlock(&bebob->mutex); |