Guest User

Untitled

a guest
Jun 22nd, 2018
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. From 66e8da50a8e779a1d3a29bc1ef985246ef6b7599 Mon Sep 17 00:00:00 2001
  2. From: Fedora Kernel Team <kernel-team@fedoraproject.org>
  3. Date: Wed, 20 Jun 2018 13:22:00 -0500
  4. Subject: [PATCH 1/3] input: hid: Add HID_QUIRK_INIT_USB_INPUT_REPORTS
  5.  
  6. ---
  7. drivers/hid/usbhid/hid-core.c | 3 +++
  8. include/linux/hid.h | 1 +
  9. 2 files changed, 4 insertions(+)
  10.  
  11. diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
  12. index 77c50cd..87c5a9d 100644
  13. --- a/drivers/hid/usbhid/hid-core.c
  14. +++ b/drivers/hid/usbhid/hid-core.c
  15. @@ -1141,6 +1141,9 @@ static int usbhid_start(struct hid_device *hid)
  16. usbhid->urbctrl->transfer_dma = usbhid->ctrlbuf_dma;
  17. usbhid->urbctrl->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
  18.  
  19. + if (hid->quirks & HID_QUIRK_INIT_USB_INPUT_REPORTS)
  20. + usbhid_init_reports(hid);
  21. +
  22. set_bit(HID_STARTED, &usbhid->iofl);
  23.  
  24. if (hid->quirks & HID_QUIRK_ALWAYS_POLL) {
  25. diff --git a/include/linux/hid.h b/include/linux/hid.h
  26. index 29b981b..21cad07 100644
  27. --- a/include/linux/hid.h
  28. +++ b/include/linux/hid.h
  29. @@ -340,6 +340,7 @@ struct hid_item {
  30. #define HID_QUIRK_NO_EMPTY_INPUT 0x00000100
  31. /* 0x00000200 reserved for backward compatibility, was NO_INIT_INPUT_REPORTS */
  32. #define HID_QUIRK_ALWAYS_POLL 0x00000400
  33. +#define HID_QUIRK_INIT_USB_INPUT_REPORTS 0x00000800
  34. #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000
  35. #define HID_QUIRK_SKIP_OUTPUT_REPORT_ID 0x00020000
  36. #define HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP 0x00040000
  37. --
  38. 2.17.1
Add Comment
Please, Sign In to add comment