HID: uhid: make creating devices work on 64/32 systems
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 18 Feb 2013 10:26:11 +0000 (11:26 +0100)
committerJiri Kosina <jkosina@suse.cz>
Mon, 18 Feb 2013 10:28:16 +0000 (11:28 +0100)
commitbefde0226a595d1a7854c0cbf32904b8279c4fd0
tree4a32e96b1216a309e405cd0546bad541baf540fe
parentc284979affcc6870a9a6545fc4b1adb3816dfcbf
HID: uhid: make creating devices work on 64/32 systems

Unfortunately UHID interface, as it was introduced, is broken with 32 bit
userspace running on 64 bit kernels as it uses a pointer in its userspace
facing API.

Fix it by checking if we are executing compat task and munge the request
appropriately.

Reported-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/uhid.c