summaryrefslogtreecommitdiff
path: root/usr/src/dkms_source_tree/wacom_wac.c
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-08-30 00:45:50 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-08-30 00:45:50 +0200
commit9c70cefed5bc44284a2cd63fc5e3b4ab3d90d0bf (patch)
tree8e02700eeec85039fee0edd5988cd533ec535c02 /usr/src/dkms_source_tree/wacom_wac.c
parent73ad231ab65dcf85fc9f134a017a501a57a3c52c (diff)
Fix bitmask bug in position reporting
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'usr/src/dkms_source_tree/wacom_wac.c')
-rw-r--r--usr/src/dkms_source_tree/wacom_wac.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr/src/dkms_source_tree/wacom_wac.c b/usr/src/dkms_source_tree/wacom_wac.c
index 03a3fdc..d1c388e 100644
--- a/usr/src/dkms_source_tree/wacom_wac.c
+++ b/usr/src/dkms_source_tree/wacom_wac.c
@@ -869,8 +869,11 @@ static int wacom_bbt_irq(struct wacom_wac *wacom, size_t len)
869 int p = data[9 * i + 2]; 869 int p = data[9 * i + 2];
870 input_mt_slot(input, i); 870 input_mt_slot(input, i);
871 if (p) { 871 if (p) {
872 int x = get_unaligned_be16(&data[9 * i + 3]) << 4; 872 int x = get_unaligned_be16(&data[9 * i + 3]) & 0x7ff;
873 int y = get_unaligned_be16(&data[9 * i + 5]) << 4; 873 int y = get_unaligned_be16(&data[9 * i + 5]) & 0x7ff;
874 /* artificial scaling */
875 x <<= 4;
876 y <<= 4;
874 input_report_abs(input, ABS_MT_PRESSURE, p); 877 input_report_abs(input, ABS_MT_PRESSURE, p);
875 input_report_abs(input, ABS_MT_POSITION_X, x); 878 input_report_abs(input, ABS_MT_POSITION_X, x);
876 input_report_abs(input, ABS_MT_POSITION_Y, y); 879 input_report_abs(input, ABS_MT_POSITION_Y, y);