提交 7f978b9b 编写于 作者: J Jiri Kosina

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: NStefan Bader <stefan.bader@canonical.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 ff5cf34c
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册