aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-06-19 11:26:09 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-06-19 11:26:09 -0700
commit4b6920ba26e1f24b949b9ca3bb782c7fac8be633 (patch)
treec3a50148cdfa88cbf883f9dcea6fbfa6c77996b4 /drivers/input/misc
parentMerge tag 'for-5.2-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux (diff)
parentInput: synaptics - enable SMBus on ThinkPad E480 and E580 (diff)
downloadlinux-dev-4b6920ba26e1f24b949b9ca3bb782c7fac8be633.tar.xz
linux-dev-4b6920ba26e1f24b949b9ca3bb782c7fac8be633.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov: "Just a few small fixups and switching a couple of Thinkpads to SMBus for touchpads as PS/2 emulation is not working well" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: synaptics - enable SMBus on ThinkPad E480 and E580 Input: imx_keypad - make sure keyboard can always wake up system Input: iqs5xx - get axis info before calling input_mt_init_slots() Input: uinput - add compat ioctl number translation for UI_*_FF_UPLOAD Input: silead - add MSSL0017 to acpi_device_id Input: elantech - enable middle button support on 2 ThinkPads Input: elan_i2c - increment wakeup count if wake source
Diffstat (limited to 'drivers/input/misc')
-rw-r--r--drivers/input/misc/uinput.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
index 2ed559dd5e25..84051f20b18a 100644
--- a/drivers/input/misc/uinput.c
+++ b/drivers/input/misc/uinput.c
@@ -1038,13 +1038,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));
}