]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - sound/core/pcm_compat.c
ALSA: pcm: Add an ioctl to specify the supported protocol version
[mirror_ubuntu-artful-kernel.git] / sound / core / pcm_compat.c
index 1f64ab0c2a95a291638406e62daa15ad6a172db3..10f537f4d73536f49cdea0b02447a497f7af7b03 100644 (file)
@@ -27,17 +27,13 @@ static int snd_pcm_ioctl_delay_compat(struct snd_pcm_substream *substream,
                                      s32 __user *src)
 {
        snd_pcm_sframes_t delay;
-       mm_segment_t fs;
-       int err;
 
-       fs = snd_enter_user();
-       err = snd_pcm_delay(substream, &delay);
-       snd_leave_user(fs);
-       if (err < 0)
-               return err;
+       delay = snd_pcm_delay(substream);
+       if (delay < 0)
+               return delay;
        if (put_user(delay, src))
                return -EFAULT;
-       return err;
+       return 0;
 }
 
 static int snd_pcm_ioctl_rewind_compat(struct snd_pcm_substream *substream,
@@ -680,6 +676,7 @@ static long snd_pcm_ioctl_compat(struct file *file, unsigned int cmd, unsigned l
        case SNDRV_PCM_IOCTL_INFO:
        case SNDRV_PCM_IOCTL_TSTAMP:
        case SNDRV_PCM_IOCTL_TTSTAMP:
+       case SNDRV_PCM_IOCTL_USER_PVERSION:
        case SNDRV_PCM_IOCTL_HWSYNC:
        case SNDRV_PCM_IOCTL_PREPARE:
        case SNDRV_PCM_IOCTL_RESET: