summaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorAlan Ott <alan@signal11.us>2011-01-04 08:37:22 +0300
committerJiri Kosina <jkosina@suse.cz>2011-01-04 13:21:28 +0300
commitae5e49c79c051ea1d5ca91cbd4a0d22189067ba3 (patch)
tree06db2f9f459515ee6e2cc74721108e718d8a6afc /drivers/hid
parent68229689b6dc950bea4b81dd60563884f4a7e1c5 (diff)
downloadlinux-ae5e49c79c051ea1d5ca91cbd4a0d22189067ba3.tar.xz
HID: hidraw: add compatibility ioctl() for 32-bit applications.
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>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hidraw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
index 68d087f63c02..468e87b53ed2 100644
--- a/drivers/hid/hidraw.c
+++ b/drivers/hid/hidraw.c
@@ -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,
};