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

Commit 34bcc44a authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: pcm: Clean up SNDRV_PCM_IOCTL_PAUSE code



Use snd_pcm_action_lock_irq() helper instead of open coding.
No functional change.

Reviewed-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 7f8a01b7
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -2865,13 +2865,9 @@ static int snd_pcm_common_ioctl1(struct file *file,
	case SNDRV_PCM_IOCTL_DROP:
		return snd_pcm_drop(substream);
	case SNDRV_PCM_IOCTL_PAUSE:
	{
		int res;
		snd_pcm_stream_lock_irq(substream);
		res = snd_pcm_pause(substream, (int)(unsigned long)arg);
		snd_pcm_stream_unlock_irq(substream);
		return res;
	}
		return snd_pcm_action_lock_irq(&snd_pcm_action_pause,
					       substream,
					       (int)(unsigned long)arg);
	}
	pcm_dbg(substream->pcm, "unknown ioctl = 0x%x\n", cmd);
	return -ENOTTY;