HID: hidraw: add compatibility ioctl() for 32-bit applications.
authorAlan Ott <alan@signal11.us>
Tue, 4 Jan 2011 05:37:22 +0000 (00:37 -0500)
committerJiri Kosina <jkosina@suse.cz>
Tue, 4 Jan 2011 10:21:28 +0000 (11:21 +0100)
Added the ioctl function to the compat_ioctl pointer in the file_operations
struct. Before this, some ioctls would fail for 32-bit apps on 64-bit systems.

Signed-off-by: Alan Ott <alan@signal11.us>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hidraw.c

index 68d087f63c02d278a06abb12c42bf015c673c99b..468e87b53ed26aadb86ed6b127599ea669a6aa99 100644 (file)
@@ -344,6 +344,9 @@ static const struct file_operations hidraw_ops = {
        .open =         hidraw_open,
        .release =      hidraw_release,
        .unlocked_ioctl = hidraw_ioctl,
+#ifdef CONFIG_COMPAT
+       .compat_ioctl   = hidraw_ioctl,
+#endif
        .llseek =       noop_llseek,
 };