diff options
author | Takashi Iwai <tiwai@suse.de> | 2016-02-28 13:30:53 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-02-28 19:44:48 +0300 |
commit | dd7e3f805231cf83317c39bd346d5e4839f5cbb0 (patch) | |
tree | 9a0a2a81a4c7abb1e3c29f72e3f4233e46426053 /sound/core | |
parent | 513ace79b657e2022a592e77f24074e088681ecc (diff) | |
download | linux-dd7e3f805231cf83317c39bd346d5e4839f5cbb0.tar.xz |
ALSA: rawmidi: Use comapt_put_timespec()
Instead of open-coding, use the existing helper to copy a 32bit
timespec from/to 64bit.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/rawmidi_compat.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/core/rawmidi_compat.c b/sound/core/rawmidi_compat.c index 5268c1f58c25..836d1c9fc2cc 100644 --- a/sound/core/rawmidi_compat.c +++ b/sound/core/rawmidi_compat.c @@ -85,8 +85,7 @@ static int snd_rawmidi_ioctl_status_compat(struct snd_rawmidi_file *rfile, if (err < 0) return err; - if (put_user(status.tstamp.tv_sec, &src->tstamp.tv_sec) || - put_user(status.tstamp.tv_nsec, &src->tstamp.tv_nsec) || + if (compat_put_timespec(&status.tstamp, &src->tstamp) || put_user(status.avail, &src->avail) || put_user(status.xruns, &src->xruns)) return -EFAULT; |