diff options
Diffstat (limited to 'sound/core/pcm_compat.c')
-rw-r--r-- | sound/core/pcm_compat.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sound/core/pcm_compat.c b/sound/core/pcm_compat.c index 6491afbb5fd5..39d853bfa5ac 100644 --- a/sound/core/pcm_compat.c +++ b/sound/core/pcm_compat.c | |||
@@ -45,10 +45,7 @@ static int snd_pcm_ioctl_rewind_compat(struct snd_pcm_substream *substream, | |||
45 | 45 | ||
46 | if (get_user(frames, src)) | 46 | if (get_user(frames, src)) |
47 | return -EFAULT; | 47 | return -EFAULT; |
48 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 48 | err = snd_pcm_rewind(substream, frames); |
49 | err = snd_pcm_playback_rewind(substream, frames); | ||
50 | else | ||
51 | err = snd_pcm_capture_rewind(substream, frames); | ||
52 | if (put_user(err, src)) | 49 | if (put_user(err, src)) |
53 | return -EFAULT; | 50 | return -EFAULT; |
54 | return err < 0 ? err : 0; | 51 | return err < 0 ? err : 0; |
@@ -62,10 +59,7 @@ static int snd_pcm_ioctl_forward_compat(struct snd_pcm_substream *substream, | |||
62 | 59 | ||
63 | if (get_user(frames, src)) | 60 | if (get_user(frames, src)) |
64 | return -EFAULT; | 61 | return -EFAULT; |
65 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 62 | err = snd_pcm_forward(substream, frames); |
66 | err = snd_pcm_playback_forward(substream, frames); | ||
67 | else | ||
68 | err = snd_pcm_capture_forward(substream, frames); | ||
69 | if (put_user(err, src)) | 63 | if (put_user(err, src)) |
70 | return -EFAULT; | 64 | return -EFAULT; |
71 | return err < 0 ? err : 0; | 65 | return err < 0 ? err : 0; |