You need to sign in or sign up before continuing.
提交 34bcc44a 编写于 作者: T Takashi Iwai

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: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 7f8a01b7
...@@ -2865,13 +2865,9 @@ static int snd_pcm_common_ioctl1(struct file *file, ...@@ -2865,13 +2865,9 @@ static int snd_pcm_common_ioctl1(struct file *file,
case SNDRV_PCM_IOCTL_DROP: case SNDRV_PCM_IOCTL_DROP:
return snd_pcm_drop(substream); return snd_pcm_drop(substream);
case SNDRV_PCM_IOCTL_PAUSE: case SNDRV_PCM_IOCTL_PAUSE:
{ return snd_pcm_action_lock_irq(&snd_pcm_action_pause,
int res; substream,
snd_pcm_stream_lock_irq(substream); (int)(unsigned long)arg);
res = snd_pcm_pause(substream, (int)(unsigned long)arg);
snd_pcm_stream_unlock_irq(substream);
return res;
}
} }
pcm_dbg(substream->pcm, "unknown ioctl = 0x%x\n", cmd); pcm_dbg(substream->pcm, "unknown ioctl = 0x%x\n", cmd);
return -ENOTTY; return -ENOTTY;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册