aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2010-02-17 09:36:35 +0100
committerJiri Kosina <jkosina@suse.cz>2010-02-17 09:36:35 +0100
commit7f978b9bf535cbbd1ae8d9fbdd7c4f60ab38f260 (patch)
treec0c3caeb4cc296f42dffb65f5e0b8418389ad66e /drivers
parentff5cf34c809cd5950579e46e7c10c29bc647aaf1 (diff)
downloadkernel_samsung_aries-7f978b9bf535cbbd1ae8d9fbdd7c4f60ab38f260.zip
kernel_samsung_aries-7f978b9bf535cbbd1ae8d9fbdd7c4f60ab38f260.tar.gz
kernel_samsung_aries-7f978b9bf535cbbd1ae8d9fbdd7c4f60ab38f260.tar.bz2
HID: extend mask for BUTTON usage page
Now that joystick button usages can expand over 15 buttons, we have to properly mask out the code from hid usage to cover the whole 0xffff available space. Reported-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hid/hid-input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index a01a1b0..79d9edd 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -193,7 +193,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
break;
case HID_UP_BUTTON:
- code = ((usage->hid - 1) & 0xf);
+ code = ((usage->hid - 1) & HID_USAGE);
switch (field->application) {
case HID_GD_MOUSE: