Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[sfrench/cifs-2.6.git] / drivers / input / misc / uinput.c
index 2ed559dd5e2522155b036fff8d4659ec67151bd7..84051f20b18a7790fea756c76f00d6b522010f71 100644 (file)
@@ -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));
 }