Skip to content
Snippets Groups Projects
Commit dd7e3f80 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

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: default avatarTakashi Iwai <tiwai@suse.de>
parent 513ace79
No related branches found
No related tags found
No related merge requests found
...@@ -85,8 +85,7 @@ static int snd_rawmidi_ioctl_status_compat(struct snd_rawmidi_file *rfile, ...@@ -85,8 +85,7 @@ static int snd_rawmidi_ioctl_status_compat(struct snd_rawmidi_file *rfile,
if (err < 0) if (err < 0)
return err; return err;
if (put_user(status.tstamp.tv_sec, &src->tstamp.tv_sec) || if (compat_put_timespec(&status.tstamp, &src->tstamp) ||
put_user(status.tstamp.tv_nsec, &src->tstamp.tv_nsec) ||
put_user(status.avail, &src->avail) || put_user(status.avail, &src->avail) ||
put_user(status.xruns, &src->xruns)) put_user(status.xruns, &src->xruns))
return -EFAULT; return -EFAULT;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment