diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-04-20 12:26:10 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-04-20 12:26:10 -0700 |
commit | 7f425895926af100cfdaebd504703325e5c08d3c (patch) | |
tree | cfbef1d9de05c8e94b15883db2d6e9ffac5c440d | |
parent | db5dc4996414d61162c9c83bf73e0e2bf2636911 (diff) | |
parent | 6f107fab8f18228936cd3df88a3bb6050865c2c8 (diff) | |
download | linux-7f425895926af100cfdaebd504703325e5c08d3c.tar.gz linux-7f425895926af100cfdaebd504703325e5c08d3c.tar.bz2 linux-7f425895926af100cfdaebd504703325e5c08d3c.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID fixes from Jiri Kosina:
"Two last-minute regression fixes for Wacom driver from Jason Gerecke"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: wacom: Override incorrect logical maximum contact identifier
HID: wacom: Treat HID_DG_TOOLSERIALNUMBER as unsigned
-rw-r--r-- | drivers/hid/wacom_wac.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index 94250c293be2..c68ac65db7ff 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -2006,7 +2006,7 @@ static void wacom_wac_pen_event(struct hid_device *hdev, struct hid_field *field return; case HID_DG_TOOLSERIALNUMBER: wacom_wac->serial[0] = (wacom_wac->serial[0] & ~0xFFFFFFFFULL); - wacom_wac->serial[0] |= value; + wacom_wac->serial[0] |= (__u32)value; return; case WACOM_HID_WD_SENSE: wacom_wac->hid_data.sense_state = value; @@ -2176,6 +2176,16 @@ static void wacom_wac_finger_usage_mapping(struct hid_device *hdev, wacom_wac->hid_data.cc_index = field->index; wacom_wac->hid_data.cc_value_index = usage->usage_index; break; + case HID_DG_CONTACTID: + if ((field->logical_maximum - field->logical_minimum) < touch_max) { + /* + * The HID descriptor for G11 sensors leaves logical + * maximum set to '1' despite it being a multitouch + * device. Override to a sensible number. + */ + field->logical_maximum = 255; + } + break; } } |