From: Stephen Rothwell Date: Wed, 9 Nov 2011 00:54:14 +0000 (+1100) Subject: Merge remote-tracking branch 'input/next' X-Git-Tag: next-20111109~25 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ace1b3f2c2090a9d347bf020fa17e6c7f8f50b42;p=karo-tx-linux.git Merge remote-tracking branch 'input/next' --- ace1b3f2c2090a9d347bf020fa17e6c7f8f50b42 diff --cc drivers/input/tablet/wacom_wac.c index da0d8761e778,6b9adc7bec6e..ecfcbc8144dc --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@@ -799,10 -799,15 +799,13 @@@ static int wacom_bpt_touch(struct wacom unsigned char *data = wacom->data; int i; + if (data[0] != 0x02) + return 0; + for (i = 0; i < 2; i++) { - int p = data[9 * i + 2]; - bool touch = p && !wacom->shared->stylus_in_proximity; + int offset = (data[1] & 0x80) ? (8 * i) : (9 * i); + bool touch = data[offset + 3] & 0x80; - input_mt_slot(input, i); - input_mt_report_slot_state(input, MT_TOOL_FINGER, touch); /* * Touch events need to be disabled while stylus is * in proximity because user's hand is resting on touchpad