Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84ac9bb1 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: line6: Drop superfluous irqsave/irqrestore in PCM trigger callback



The PCM trigger callback is guaranteed to be called already in
spinlock / irq-disabled context.

Tested-by: default avatarChris Rorvick <chris@rorvick.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 7d70c81c
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -227,9 +227,8 @@ int snd_line6_trigger(struct snd_pcm_substream *substream, int cmd)
	struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream);
	struct snd_pcm_substream *s;
	int err;
	unsigned long flags;

	spin_lock_irqsave(&line6pcm->lock_trigger, flags);
	spin_lock(&line6pcm->lock_trigger);
	clear_bit(LINE6_INDEX_PREPARED, &line6pcm->flags);

	snd_pcm_group_for_each_entry(s, substream) {
@@ -240,8 +239,7 @@ int snd_line6_trigger(struct snd_pcm_substream *substream, int cmd)
			err = snd_line6_playback_trigger(line6pcm, cmd);

			if (err < 0) {
				spin_unlock_irqrestore(&line6pcm->lock_trigger,
						       flags);
				spin_unlock(&line6pcm->lock_trigger);
				return err;
			}

@@ -251,8 +249,7 @@ int snd_line6_trigger(struct snd_pcm_substream *substream, int cmd)
			err = snd_line6_capture_trigger(line6pcm, cmd);

			if (err < 0) {
				spin_unlock_irqrestore(&line6pcm->lock_trigger,
						       flags);
				spin_unlock(&line6pcm->lock_trigger);
				return err;
			}

@@ -264,7 +261,7 @@ int snd_line6_trigger(struct snd_pcm_substream *substream, int cmd)
		}
	}

	spin_unlock_irqrestore(&line6pcm->lock_trigger, flags);
	spin_unlock(&line6pcm->lock_trigger);
	return 0;
}