wacom_sys.c (58e16d792a6a8c6b750f637a4649967fcac853dc) | wacom_sys.c (073b50bccbbf99a3b79a1913604c656d0e1a56c9) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * drivers/input/tablet/wacom_sys.c 4 * 5 * USB Wacom tablet support - system specific code 6 */ 7 8/* --- 74 unchanged lines hidden (view full) --- 83 if (err) { 84 hid_warn(hdev, "%s: unable to flush event due to error %d\n", 85 __func__, err); 86 } 87 } 88} 89 90static int wacom_wac_pen_serial_enforce(struct hid_device *hdev, | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * drivers/input/tablet/wacom_sys.c 4 * 5 * USB Wacom tablet support - system specific code 6 */ 7 8/* --- 74 unchanged lines hidden (view full) --- 83 if (err) { 84 hid_warn(hdev, "%s: unable to flush event due to error %d\n", 85 __func__, err); 86 } 87 } 88} 89 90static int wacom_wac_pen_serial_enforce(struct hid_device *hdev, |
91 struct hid_report *report, u8 *raw_data, int size) | 91 struct hid_report *report, u8 *raw_data, int report_size) |
92{ 93 struct wacom *wacom = hid_get_drvdata(hdev); 94 struct wacom_wac *wacom_wac = &wacom->wacom_wac; 95 struct wacom_features *features = &wacom_wac->features; 96 bool flush = false; 97 bool insert = false; 98 int i, j; 99 --- 44 unchanged lines hidden (view full) --- 144 insert = true; 145 } 146 } 147 } 148 149 if (flush) 150 wacom_wac_queue_flush(hdev, &wacom_wac->pen_fifo); 151 else if (insert) | 92{ 93 struct wacom *wacom = hid_get_drvdata(hdev); 94 struct wacom_wac *wacom_wac = &wacom->wacom_wac; 95 struct wacom_features *features = &wacom_wac->features; 96 bool flush = false; 97 bool insert = false; 98 int i, j; 99 --- 44 unchanged lines hidden (view full) --- 144 insert = true; 145 } 146 } 147 } 148 149 if (flush) 150 wacom_wac_queue_flush(hdev, &wacom_wac->pen_fifo); 151 else if (insert) |
152 wacom_wac_queue_insert(hdev, &wacom_wac->pen_fifo, raw_data, size); | 152 wacom_wac_queue_insert(hdev, &wacom_wac->pen_fifo, 153 raw_data, report_size); |
153 154 return insert && !flush; 155} 156 157static int wacom_raw_event(struct hid_device *hdev, struct hid_report *report, 158 u8 *raw_data, int size) 159{ 160 struct wacom *wacom = hid_get_drvdata(hdev); --- 2010 unchanged lines hidden (view full) --- 2171 2172 return size; 2173} 2174 2175static void wacom_update_name(struct wacom *wacom, const char *suffix) 2176{ 2177 struct wacom_wac *wacom_wac = &wacom->wacom_wac; 2178 struct wacom_features *features = &wacom_wac->features; | 154 155 return insert && !flush; 156} 157 158static int wacom_raw_event(struct hid_device *hdev, struct hid_report *report, 159 u8 *raw_data, int size) 160{ 161 struct wacom *wacom = hid_get_drvdata(hdev); --- 2010 unchanged lines hidden (view full) --- 2172 2173 return size; 2174} 2175 2176static void wacom_update_name(struct wacom *wacom, const char *suffix) 2177{ 2178 struct wacom_wac *wacom_wac = &wacom->wacom_wac; 2179 struct wacom_features *features = &wacom_wac->features; |
2179 char name[WACOM_NAME_MAX]; | 2180 char name[WACOM_NAME_MAX - 20]; /* Leave some room for suffixes */ |
2180 2181 /* Generic devices name unspecified */ 2182 if ((features->type == HID_GENERIC) && !strcmp("Wacom HID", features->name)) { 2183 char *product_name = wacom->hdev->name; 2184 2185 if (hid_is_using_ll_driver(wacom->hdev, &usb_hid_driver)) { 2186 struct usb_interface *intf = to_usb_interface(wacom->hdev->dev.parent); 2187 struct usb_device *dev = interface_to_usbdev(intf); --- 650 unchanged lines hidden --- | 2181 2182 /* Generic devices name unspecified */ 2183 if ((features->type == HID_GENERIC) && !strcmp("Wacom HID", features->name)) { 2184 char *product_name = wacom->hdev->name; 2185 2186 if (hid_is_using_ll_driver(wacom->hdev, &usb_hid_driver)) { 2187 struct usb_interface *intf = to_usb_interface(wacom->hdev->dev.parent); 2188 struct usb_device *dev = interface_to_usbdev(intf); --- 650 unchanged lines hidden --- |