Loading drivers/hid/Kconfig +1 −1 Original line number Diff line number Diff line Loading @@ -924,7 +924,7 @@ config HID_UDRAW_PS3 config HID_WACOM tristate "Wacom Intuos/Graphire tablet support (USB)" depends on HID depends on USB_HID select POWER_SUPPLY select NEW_LEDS select LEDS_CLASS Loading drivers/hid/i2c-hid/i2c-hid.c +2 −1 Original line number Diff line number Diff line Loading @@ -780,7 +780,7 @@ static int i2c_hid_power(struct hid_device *hid, int lvl) return 0; } static struct hid_ll_driver i2c_hid_ll_driver = { struct hid_ll_driver i2c_hid_ll_driver = { .parse = i2c_hid_parse, .start = i2c_hid_start, .stop = i2c_hid_stop, Loading @@ -790,6 +790,7 @@ static struct hid_ll_driver i2c_hid_ll_driver = { .output_report = i2c_hid_output_report, .raw_request = i2c_hid_raw_request, }; EXPORT_SYMBOL_GPL(i2c_hid_ll_driver); static int i2c_hid_init_irq(struct i2c_client *client) { Loading drivers/hid/uhid.c +2 −1 Original line number Diff line number Diff line Loading @@ -369,7 +369,7 @@ static int uhid_hid_output_report(struct hid_device *hid, __u8 *buf, return uhid_hid_output_raw(hid, buf, count, HID_OUTPUT_REPORT); } static struct hid_ll_driver uhid_hid_driver = { struct hid_ll_driver uhid_hid_driver = { .start = uhid_hid_start, .stop = uhid_hid_stop, .open = uhid_hid_open, Loading @@ -378,6 +378,7 @@ static struct hid_ll_driver uhid_hid_driver = { .raw_request = uhid_hid_raw_request, .output_report = uhid_hid_output_report, }; EXPORT_SYMBOL_GPL(uhid_hid_driver); #ifdef CONFIG_COMPAT Loading drivers/hid/usbhid/hid-core.c +2 −1 Original line number Diff line number Diff line Loading @@ -1265,7 +1265,7 @@ static int usbhid_idle(struct hid_device *hid, int report, int idle, return hid_set_idle(dev, ifnum, report, idle); } static struct hid_ll_driver usb_hid_driver = { struct hid_ll_driver usb_hid_driver = { .parse = usbhid_parse, .start = usbhid_start, .stop = usbhid_stop, Loading @@ -1278,6 +1278,7 @@ static struct hid_ll_driver usb_hid_driver = { .output_report = usbhid_output_report, .idle = usbhid_idle, }; EXPORT_SYMBOL_GPL(usb_hid_driver); static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id *id) { Loading drivers/hid/wacom_sys.c +28 −35 Original line number Diff line number Diff line Loading @@ -1671,10 +1671,7 @@ static ssize_t wacom_show_remote_mode(struct kobject *kobj, u8 mode; mode = wacom->led.groups[index].select; if (mode >= 0 && mode < 3) return snprintf(buf, PAGE_SIZE, "%d\n", mode); else return snprintf(buf, PAGE_SIZE, "%d\n", -1); return sprintf(buf, "%d\n", mode < 3 ? mode : -1); } #define DEVICE_EKR_ATTR_GROUP(SET_ID) \ Loading Loading @@ -2028,11 +2025,24 @@ static void wacom_update_name(struct wacom *wacom, const char *suffix) /* Generic devices name unspecified */ if ((features->type == HID_GENERIC) && !strcmp("Wacom HID", features->name)) { if (strstr(wacom->hdev->name, "Wacom") || strstr(wacom->hdev->name, "wacom") || strstr(wacom->hdev->name, "WACOM")) { /* name is in HID descriptor, use it */ strlcpy(name, wacom->hdev->name, sizeof(name)); char *product_name = wacom->hdev->name; if (hid_is_using_ll_driver(wacom->hdev, &usb_hid_driver)) { struct usb_interface *intf = to_usb_interface(wacom->hdev->dev.parent); struct usb_device *dev = interface_to_usbdev(intf); product_name = dev->product; } if (wacom->hdev->bus == BUS_I2C) { snprintf(name, sizeof(name), "%s %X", features->name, wacom->hdev->product); } else if (strstr(product_name, "Wacom") || strstr(product_name, "wacom") || strstr(product_name, "WACOM")) { strlcpy(name, product_name, sizeof(name)); } else { snprintf(name, sizeof(name), "Wacom %s", product_name); } /* strip out excess whitespaces */ while (1) { Loading @@ -2043,26 +2053,9 @@ static void wacom_update_name(struct wacom *wacom, const char *suffix) memmove(gap, gap+1, strlen(gap)); } /* strip off excessive prefixing */ if (strstr(name, "Wacom Co.,Ltd. Wacom ") == name) { int n = strlen(name); int x = strlen("Wacom Co.,Ltd. "); memmove(name, name+x, n-x+1); } if (strstr(name, "Wacom Co., Ltd. Wacom ") == name) { int n = strlen(name); int x = strlen("Wacom Co., Ltd. "); memmove(name, name+x, n-x+1); } /* get rid of trailing whitespace */ if (name[strlen(name)-1] == ' ') name[strlen(name)-1] = '\0'; } else { /* no meaningful name retrieved. use product ID */ snprintf(name, sizeof(name), "%s %X", features->name, wacom->hdev->product); } } else { strlcpy(name, features->name, sizeof(name)); } Loading Loading
drivers/hid/Kconfig +1 −1 Original line number Diff line number Diff line Loading @@ -924,7 +924,7 @@ config HID_UDRAW_PS3 config HID_WACOM tristate "Wacom Intuos/Graphire tablet support (USB)" depends on HID depends on USB_HID select POWER_SUPPLY select NEW_LEDS select LEDS_CLASS Loading
drivers/hid/i2c-hid/i2c-hid.c +2 −1 Original line number Diff line number Diff line Loading @@ -780,7 +780,7 @@ static int i2c_hid_power(struct hid_device *hid, int lvl) return 0; } static struct hid_ll_driver i2c_hid_ll_driver = { struct hid_ll_driver i2c_hid_ll_driver = { .parse = i2c_hid_parse, .start = i2c_hid_start, .stop = i2c_hid_stop, Loading @@ -790,6 +790,7 @@ static struct hid_ll_driver i2c_hid_ll_driver = { .output_report = i2c_hid_output_report, .raw_request = i2c_hid_raw_request, }; EXPORT_SYMBOL_GPL(i2c_hid_ll_driver); static int i2c_hid_init_irq(struct i2c_client *client) { Loading
drivers/hid/uhid.c +2 −1 Original line number Diff line number Diff line Loading @@ -369,7 +369,7 @@ static int uhid_hid_output_report(struct hid_device *hid, __u8 *buf, return uhid_hid_output_raw(hid, buf, count, HID_OUTPUT_REPORT); } static struct hid_ll_driver uhid_hid_driver = { struct hid_ll_driver uhid_hid_driver = { .start = uhid_hid_start, .stop = uhid_hid_stop, .open = uhid_hid_open, Loading @@ -378,6 +378,7 @@ static struct hid_ll_driver uhid_hid_driver = { .raw_request = uhid_hid_raw_request, .output_report = uhid_hid_output_report, }; EXPORT_SYMBOL_GPL(uhid_hid_driver); #ifdef CONFIG_COMPAT Loading
drivers/hid/usbhid/hid-core.c +2 −1 Original line number Diff line number Diff line Loading @@ -1265,7 +1265,7 @@ static int usbhid_idle(struct hid_device *hid, int report, int idle, return hid_set_idle(dev, ifnum, report, idle); } static struct hid_ll_driver usb_hid_driver = { struct hid_ll_driver usb_hid_driver = { .parse = usbhid_parse, .start = usbhid_start, .stop = usbhid_stop, Loading @@ -1278,6 +1278,7 @@ static struct hid_ll_driver usb_hid_driver = { .output_report = usbhid_output_report, .idle = usbhid_idle, }; EXPORT_SYMBOL_GPL(usb_hid_driver); static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id *id) { Loading
drivers/hid/wacom_sys.c +28 −35 Original line number Diff line number Diff line Loading @@ -1671,10 +1671,7 @@ static ssize_t wacom_show_remote_mode(struct kobject *kobj, u8 mode; mode = wacom->led.groups[index].select; if (mode >= 0 && mode < 3) return snprintf(buf, PAGE_SIZE, "%d\n", mode); else return snprintf(buf, PAGE_SIZE, "%d\n", -1); return sprintf(buf, "%d\n", mode < 3 ? mode : -1); } #define DEVICE_EKR_ATTR_GROUP(SET_ID) \ Loading Loading @@ -2028,11 +2025,24 @@ static void wacom_update_name(struct wacom *wacom, const char *suffix) /* Generic devices name unspecified */ if ((features->type == HID_GENERIC) && !strcmp("Wacom HID", features->name)) { if (strstr(wacom->hdev->name, "Wacom") || strstr(wacom->hdev->name, "wacom") || strstr(wacom->hdev->name, "WACOM")) { /* name is in HID descriptor, use it */ strlcpy(name, wacom->hdev->name, sizeof(name)); char *product_name = wacom->hdev->name; if (hid_is_using_ll_driver(wacom->hdev, &usb_hid_driver)) { struct usb_interface *intf = to_usb_interface(wacom->hdev->dev.parent); struct usb_device *dev = interface_to_usbdev(intf); product_name = dev->product; } if (wacom->hdev->bus == BUS_I2C) { snprintf(name, sizeof(name), "%s %X", features->name, wacom->hdev->product); } else if (strstr(product_name, "Wacom") || strstr(product_name, "wacom") || strstr(product_name, "WACOM")) { strlcpy(name, product_name, sizeof(name)); } else { snprintf(name, sizeof(name), "Wacom %s", product_name); } /* strip out excess whitespaces */ while (1) { Loading @@ -2043,26 +2053,9 @@ static void wacom_update_name(struct wacom *wacom, const char *suffix) memmove(gap, gap+1, strlen(gap)); } /* strip off excessive prefixing */ if (strstr(name, "Wacom Co.,Ltd. Wacom ") == name) { int n = strlen(name); int x = strlen("Wacom Co.,Ltd. "); memmove(name, name+x, n-x+1); } if (strstr(name, "Wacom Co., Ltd. Wacom ") == name) { int n = strlen(name); int x = strlen("Wacom Co., Ltd. "); memmove(name, name+x, n-x+1); } /* get rid of trailing whitespace */ if (name[strlen(name)-1] == ' ') name[strlen(name)-1] = '\0'; } else { /* no meaningful name retrieved. use product ID */ snprintf(name, sizeof(name), "%s %X", features->name, wacom->hdev->product); } } else { strlcpy(name, features->name, sizeof(name)); } Loading