diff options
author | Jason Gerecke <killertofu@gmail.com> | 2015-04-15 17:22:32 -0700 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-04-23 10:06:10 +0200 |
commit | 71b5c4766c1ca4c646a90f64552b140b1368f2f1 (patch) | |
tree | 9eba2f2c0ceb14752ca2d206846367353f6e33eb /drivers/hid/wacom_wac.c | |
parent | e48151a3a456b38b1029a8a7380246b53c768400 (diff) |
HID: wacom: Simplify check for presence of single-finger touch
To determine if a touch is present in the single-touch case, we can
simply check if the BTN_TOUCH key is active or not. This will work for
both HID_GENERIC and other device types.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/wacom_wac.c')
-rw-r--r-- | drivers/hid/wacom_wac.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index 3609cbe9877b..091bab4a0034 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -1072,9 +1072,8 @@ static int wacom_wac_finger_count_touches(struct wacom_wac *wacom) int count = 0; int i; - /* non-HID_GENERIC single touch input doesn't call this routine */ - if ((touch_max == 1) && (wacom->features.type == HID_GENERIC)) - return wacom->hid_data.tipswitch && + if (touch_max == 1) + return test_bit(BTN_TOUCH, input->key) && !wacom->shared->stylus_in_proximity; for (i = 0; i < input->mt->num_slots; i++) { |