diff options
author | Takashi Iwai <tiwai@suse.de> | 2016-05-24 14:58:04 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-06-14 07:43:09 +0200 |
commit | 34bcc44abb302d1586bf1eb7548be75d0f56babc (patch) | |
tree | 7a578981071af43e665aa8f5a9d4614e5cddcdd1 /sound/core/pcm_native.c | |
parent | Merge branch 'topic/seq-kconfig' into for-next (diff) | |
download | linux-34bcc44abb302d1586bf1eb7548be75d0f56babc.tar.xz linux-34bcc44abb302d1586bf1eb7548be75d0f56babc.zip |
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: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r-- | sound/core/pcm_native.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 07995e645327..798bca967c0e 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -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; |