diff mbox series

UBUNTU: SAUCE:

Message ID 20191002122106.2465-2-georgekarapi@yahoo.gr
State New
Headers show
Series UBUNTU: SAUCE: | expand

Commit Message

Giorgos Karapiperidis Oct. 2, 2019, 12:21 p.m. UTC
<Why is this patch not going upstream?>

Signed-off-by: Giorgos Karapiperidis <georgekarapi@yahoo.gr>

OriginalAuthor: Giorgos Karapiperidis <georgekarapi@yahoo.gr>
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1685937

Fixes wrong HID driver grouping for Vendor ID 1018
---
 drivers/hid/hid-core.c | 16 ++++++++--------
 drivers/hid/hid-ids.h  |  6 ++----
 2 files changed, 10 insertions(+), 12 deletions(-)

Comments

Connor Kuehl Oct. 10, 2019, 3:17 p.m. UTC | #1
On 10/2/19 5:21 AM, Giorgos Karapiperidis wrote:
> <Why is this patch not going upstream?>

Actually, this is the question I'm curious to know the answer to as well :-)

Has this been sent upstream?
diff mbox series

Patch

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 39eba8106d40..f4281f9cce29 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -864,6 +864,9 @@  static int hid_scan_report(struct hid_device *hid)
 				 */
 				hid->group = HID_GROUP_RMI;
 		break;
+	case USB_VENDOR_ID_1018:
+		hid->group = HID_GROUP_GENERIC;
+		break;
 	}
 
 	kfree(parser->collection_stack);
@@ -1313,10 +1316,10 @@  static u32 __extract(u8 *report, unsigned offset, int n)
 u32 hid_field_extract(const struct hid_device *hid, u8 *report,
 			unsigned offset, unsigned n)
 {
-	if (n > 32) {
-		hid_warn(hid, "hid_field_extract() called with n (%d) > 32! (%s)\n",
+	if (n > 256) {
+		hid_warn(hid, "hid_field_extract() called with n (%d) > 256! (%s)\n",
 			 n, current->comm);
-		n = 32;
+		n = 256;
 	}
 
 	return __extract(report, offset, n);
@@ -1636,7 +1639,7 @@  static struct hid_report *hid_get_report(struct hid_report_enum *report_enum,
  * Implement a generic .request() callback, using .raw_request()
  * DO NOT USE in hid drivers directly, but through hid_hw_request instead.
  */
-int __hid_request(struct hid_device *hid, struct hid_report *report,
+void __hid_request(struct hid_device *hid, struct hid_report *report,
 		int reqtype)
 {
 	char *buf;
@@ -1645,7 +1648,7 @@  int __hid_request(struct hid_device *hid, struct hid_report *report,
 
 	buf = hid_alloc_report_buf(report, GFP_KERNEL);
 	if (!buf)
-		return -ENOMEM;
+		return;
 
 	len = hid_report_len(report);
 
@@ -1662,11 +1665,8 @@  int __hid_request(struct hid_device *hid, struct hid_report *report,
 	if (reqtype == HID_REQ_GET_REPORT)
 		hid_input_report(hid, report->type, buf, ret, 0);
 
-	ret = 0;
-
 out:
 	kfree(buf);
-	return ret;
 }
 EXPORT_SYMBOL_GPL(__hid_request);
 
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index a0c4f47f2896..e0d0359949e3 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -17,6 +17,8 @@ 
 #ifndef HID_IDS_H_FILE
 #define HID_IDS_H_FILE
 
+#define USB_VENDOR_ID_1018 0x1018
+
 #define USB_VENDOR_ID_258A		0x258a
 #define USB_DEVICE_ID_258A_6A88		0x6a88
 
@@ -272,7 +274,6 @@ 
 #define USB_DEVICE_ID_CHICONY_MULTI_TOUCH	0xb19d
 #define USB_DEVICE_ID_CHICONY_WIRELESS	0x0618
 #define USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE	0x1053
-#define USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2	0x0939
 #define USB_DEVICE_ID_CHICONY_WIRELESS2	0x1123
 #define USB_DEVICE_ID_ASUS_AK1D		0x1125
 #define USB_DEVICE_ID_CHICONY_ACER_SWITCH12	0x1421
@@ -568,7 +569,6 @@ 
 #define USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0B4A	0x0b4a
 #define USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE		0x134a
 #define USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_094A	0x094a
-#define USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_0641	0x0641
 
 #define USB_VENDOR_ID_HUION		0x256c
 #define USB_DEVICE_ID_HUION_TABLET	0x006e
@@ -982,7 +982,6 @@ 
 #define USB_DEVICE_ID_SAITEK_RAT7	0x0cd7
 #define USB_DEVICE_ID_SAITEK_RAT9	0x0cfa
 #define USB_DEVICE_ID_SAITEK_MMO7	0x0cd0
-#define USB_DEVICE_ID_SAITEK_X52	0x075c
 
 #define USB_VENDOR_ID_SAMSUNG		0x0419
 #define USB_DEVICE_ID_SAMSUNG_IR_REMOTE	0x0001
@@ -1228,7 +1227,6 @@ 
 #define USB_DEVICE_ID_PRIMAX_KEYBOARD	0x4e05
 #define USB_DEVICE_ID_PRIMAX_REZEL	0x4e72
 #define USB_DEVICE_ID_PRIMAX_PIXART_MOUSE_4D0F	0x4d0f
-#define USB_DEVICE_ID_PRIMAX_PIXART_MOUSE_4D65	0x4d65
 #define USB_DEVICE_ID_PRIMAX_PIXART_MOUSE_4E22	0x4e22