diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2019-08-01 03:18:11 -0700 |
|---|---|---|
| committer | Linux Build Service Account <lnxbuild@localhost> | 2019-08-01 03:18:11 -0700 |
| commit | 12f1cbf68dc1628166291cc338457cdd752dac49 (patch) | |
| tree | a25f2f1b4643a0f7ed518dc4d6892369fc1da4ca /drivers/input | |
| parent | b67de9bff3349bd73a16cecef3f1c3ef3806d3ed (diff) | |
| parent | 80cb08efce94fb197b05bc1c9dfaeb72a765eb96 (diff) | |
Merge 80cb08efce94fb197b05bc1c9dfaeb72a765eb96 on remote branch
Change-Id: I270427b762a19e22283edf694d7ca2585a228ad1
Diffstat (limited to 'drivers/input')
| -rw-r--r-- | drivers/input/misc/uinput.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index 2bb4c8633d3b..7cffff22a1ca 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c @@ -894,13 +894,31 @@ static long uinput_ioctl(struct file *file, unsigned int cmd, unsigned long arg) #ifdef CONFIG_COMPAT -#define UI_SET_PHYS_COMPAT _IOW(UINPUT_IOCTL_BASE, 108, compat_uptr_t) +/* + * These IOCTLs change their size and thus their numbers between + * 32 and 64 bits. + */ +#define UI_SET_PHYS_COMPAT \ + _IOW(UINPUT_IOCTL_BASE, 108, compat_uptr_t) +#define UI_BEGIN_FF_UPLOAD_COMPAT \ + _IOWR(UINPUT_IOCTL_BASE, 200, struct uinput_ff_upload_compat) +#define UI_END_FF_UPLOAD_COMPAT \ + _IOW(UINPUT_IOCTL_BASE, 201, struct uinput_ff_upload_compat) static long uinput_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { - if (cmd == UI_SET_PHYS_COMPAT) + switch (cmd) { + case UI_SET_PHYS_COMPAT: cmd = UI_SET_PHYS; + break; + case UI_BEGIN_FF_UPLOAD_COMPAT: + cmd = UI_BEGIN_FF_UPLOAD; + break; + case UI_END_FF_UPLOAD_COMPAT: + cmd = UI_END_FF_UPLOAD; + break; + } return uinput_ioctl_handler(file, cmd, arg, compat_ptr(arg)); } |
