Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/hid/hid

Pull HID fixes from Jiri Kosina:

 - NULL pointer dereference regression fix for Wacom driver (Jason
   Gerecke)

 - functional regression fix for pam handling on some Elan and Synaptics
   touchpads (Kai-Heng Feng)

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
  HID: wacom: Correct NULL dereference on AES pen proximity
  HID: multitouch: Apply MT_QUIRK_CONFIDENCE quirk for multi-input devices
  • Loading branch information
torvalds committed Jan 28, 2021
2 parents fc856f1 + 179e8e4 commit 25221c9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion drivers/hid/hid-multitouch.c
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,8 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
MT_STORE_FIELD(inrange_state);
return 1;
case HID_DG_CONFIDENCE:
if (cls->name == MT_CLS_WIN_8 &&
if ((cls->name == MT_CLS_WIN_8 ||
cls->name == MT_CLS_WIN_8_FORCE_MULTI_INPUT) &&
(field->application == HID_DG_TOUCHPAD ||
field->application == HID_DG_TOUCHSCREEN))
app->quirks |= MT_QUIRK_CONFIDENCE;
Expand Down
7 changes: 4 additions & 3 deletions drivers/hid/wacom_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ static int wacom_wac_pen_serial_enforce(struct hid_device *hdev,
}

if (flush)
wacom_wac_queue_flush(hdev, &wacom_wac->pen_fifo);
wacom_wac_queue_flush(hdev, wacom_wac->pen_fifo);
else if (insert)
wacom_wac_queue_insert(hdev, &wacom_wac->pen_fifo,
wacom_wac_queue_insert(hdev, wacom_wac->pen_fifo,
raw_data, report_size);

return insert && !flush;
Expand Down Expand Up @@ -1280,7 +1280,7 @@ static void wacom_devm_kfifo_release(struct device *dev, void *res)
static int wacom_devm_kfifo_alloc(struct wacom *wacom)
{
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
struct kfifo_rec_ptr_2 *pen_fifo = &wacom_wac->pen_fifo;
struct kfifo_rec_ptr_2 *pen_fifo;
int error;

pen_fifo = devres_alloc(wacom_devm_kfifo_release,
Expand All @@ -1297,6 +1297,7 @@ static int wacom_devm_kfifo_alloc(struct wacom *wacom)
}

devres_add(&wacom->hdev->dev, pen_fifo);
wacom_wac->pen_fifo = pen_fifo;

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/hid/wacom_wac.h
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ struct wacom_wac {
struct input_dev *pen_input;
struct input_dev *touch_input;
struct input_dev *pad_input;
struct kfifo_rec_ptr_2 pen_fifo;
struct kfifo_rec_ptr_2 *pen_fifo;
int pid;
int num_contacts_left;
u8 bt_features;
Expand Down

0 comments on commit 25221c9

Please sign in to comment.