Skip to content

Commit

Permalink
HID: wacom: bits shifted too much for 9th and 10th buttons
Browse files Browse the repository at this point in the history
Cintiq 12 has 10 expresskey buttons. The bit shift for the last
two buttons were off by 5.

Fixes: c7f0522 ("HID: wacom: Slim down wacom_intuos_pad processing")

Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
Tested-by: Matthieu Robin <matthieu@macolu.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Ping Cheng authored and Jiri Kosina committed Sep 6, 2017
1 parent b42a362 commit ce06760
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hid/wacom_wac.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,8 @@ static int wacom_intuos_pad(struct wacom_wac *wacom)
keys = data[9] & 0x07;
}
} else {
buttons = ((data[6] & 0x10) << 10) |
((data[5] & 0x10) << 9) |
buttons = ((data[6] & 0x10) << 5) |
((data[5] & 0x10) << 4) |
((data[6] & 0x0F) << 4) |
(data[5] & 0x0F);
}
Expand Down

0 comments on commit ce06760

Please sign in to comment.