Commit 113fc8b3 authored by Vojtech Pavlik's avatar Vojtech Pavlik

input: Add MCC devices to HID blacklist, cleanup whitespace along

       the way.

From: Mark Glines <mark-pmd@glines.org>
Signed-off-by: default avatarVojtech Pavlik <vojtech@suse.cz>
parent 1dcb0e66
...@@ -121,18 +121,17 @@ static int open_collection(struct hid_parser *parser, unsigned type) ...@@ -121,18 +121,17 @@ static int open_collection(struct hid_parser *parser, unsigned type)
if (parser->device->maxcollection == parser->device->collection_size) { if (parser->device->maxcollection == parser->device->collection_size) {
collection = kmalloc(sizeof(struct hid_collection) * collection = kmalloc(sizeof(struct hid_collection) *
parser->device->collection_size * 2, parser->device->collection_size * 2, GFP_KERNEL);
GFP_KERNEL);
if (collection == NULL) { if (collection == NULL) {
dbg("failed to reallocate collection array"); dbg("failed to reallocate collection array");
return -1; return -1;
} }
memcpy(collection, parser->device->collection, memcpy(collection, parser->device->collection,
sizeof(struct hid_collection) * sizeof(struct hid_collection) *
parser->device->collection_size); parser->device->collection_size);
memset(collection + parser->device->collection_size, 0, memset(collection + parser->device->collection_size, 0,
sizeof(struct hid_collection) * sizeof(struct hid_collection) *
parser->device->collection_size); parser->device->collection_size);
kfree(parser->device->collection); kfree(parser->device->collection);
parser->device->collection = collection; parser->device->collection = collection;
parser->device->collection_size *= 2; parser->device->collection_size *= 2;
...@@ -141,12 +140,12 @@ static int open_collection(struct hid_parser *parser, unsigned type) ...@@ -141,12 +140,12 @@ static int open_collection(struct hid_parser *parser, unsigned type)
parser->collection_stack[parser->collection_stack_ptr++] = parser->collection_stack[parser->collection_stack_ptr++] =
parser->device->maxcollection; parser->device->maxcollection;
collection = parser->device->collection + collection = parser->device->collection +
parser->device->maxcollection++; parser->device->maxcollection++;
collection->type = type; collection->type = type;
collection->usage = usage; collection->usage = usage;
collection->level = parser->collection_stack_ptr - 1; collection->level = parser->collection_stack_ptr - 1;
if (type == HID_COLLECTION_APPLICATION) if (type == HID_COLLECTION_APPLICATION)
parser->device->maxapplication++; parser->device->maxapplication++;
...@@ -193,7 +192,7 @@ static int hid_add_usage(struct hid_parser *parser, unsigned usage) ...@@ -193,7 +192,7 @@ static int hid_add_usage(struct hid_parser *parser, unsigned usage)
} }
parser->local.usage[parser->local.usage_index] = usage; parser->local.usage[parser->local.usage_index] = usage;
parser->local.collection_index[parser->local.usage_index] = parser->local.collection_index[parser->local.usage_index] =
parser->collection_stack_ptr ? parser->collection_stack_ptr ?
parser->collection_stack[parser->collection_stack_ptr - 1] : 0; parser->collection_stack[parser->collection_stack_ptr - 1] : 0;
parser->local.usage_index++; parser->local.usage_index++;
return 0; return 0;
...@@ -220,7 +219,7 @@ static int hid_add_field(struct hid_parser *parser, unsigned report_type, unsign ...@@ -220,7 +219,7 @@ static int hid_add_field(struct hid_parser *parser, unsigned report_type, unsign
dbg("logical range invalid %d %d", parser->global.logical_minimum, parser->global.logical_maximum); dbg("logical range invalid %d %d", parser->global.logical_minimum, parser->global.logical_maximum);
return -1; return -1;
} }
if (!(usages = max_t(int, parser->local.usage_index, parser->global.report_count))) if (!(usages = max_t(int, parser->local.usage_index, parser->global.report_count)))
return 0; /* Ignore padding fields */ return 0; /* Ignore padding fields */
...@@ -581,13 +580,13 @@ static u8 *fetch_item(__u8 *start, __u8 *end, struct hid_item *item) ...@@ -581,13 +580,13 @@ static u8 *fetch_item(__u8 *start, __u8 *end, struct hid_item *item)
item->size = *start++; item->size = *start++;
item->tag = *start++; item->tag = *start++;
if ((end - start) < item->size) if ((end - start) < item->size)
return NULL; return NULL;
item->data.longdata = start; item->data.longdata = start;
start += item->size; start += item->size;
return start; return start;
} }
item->format = HID_ITEM_FORMAT_SHORT; item->format = HID_ITEM_FORMAT_SHORT;
item->size = b & 3; item->size = b & 3;
...@@ -604,7 +603,7 @@ static u8 *fetch_item(__u8 *start, __u8 *end, struct hid_item *item) ...@@ -604,7 +603,7 @@ static u8 *fetch_item(__u8 *start, __u8 *end, struct hid_item *item)
return start; return start;
case 2: case 2:
if ((end - start) < 2) if ((end - start) < 2)
return NULL; return NULL;
item->data.u16 = le16_to_cpu(get_unaligned((__le16*)start)); item->data.u16 = le16_to_cpu(get_unaligned((__le16*)start));
start = (__u8 *)((__le16 *)start + 1); start = (__u8 *)((__le16 *)start + 1);
...@@ -646,13 +645,13 @@ static struct hid_device *hid_parse_report(__u8 *start, unsigned size) ...@@ -646,13 +645,13 @@ static struct hid_device *hid_parse_report(__u8 *start, unsigned size)
return NULL; return NULL;
memset(device, 0, sizeof(struct hid_device)); memset(device, 0, sizeof(struct hid_device));
if (!(device->collection =kmalloc(sizeof(struct hid_collection) * if (!(device->collection = kmalloc(sizeof(struct hid_collection) *
HID_DEFAULT_NUM_COLLECTIONS, GFP_KERNEL))) { HID_DEFAULT_NUM_COLLECTIONS, GFP_KERNEL))) {
kfree(device); kfree(device);
return NULL; return NULL;
} }
memset(device->collection, 0, sizeof(struct hid_collection) * memset(device->collection, 0, sizeof(struct hid_collection) *
HID_DEFAULT_NUM_COLLECTIONS); HID_DEFAULT_NUM_COLLECTIONS);
device->collection_size = HID_DEFAULT_NUM_COLLECTIONS; device->collection_size = HID_DEFAULT_NUM_COLLECTIONS;
for (i = 0; i < HID_REPORT_TYPES; i++) for (i = 0; i < HID_REPORT_TYPES; i++)
...@@ -831,7 +830,7 @@ static void hid_input_field(struct hid_device *hid, struct hid_field *field, __u ...@@ -831,7 +830,7 @@ static void hid_input_field(struct hid_device *hid, struct hid_field *field, __u
} else { } else {
if (value[n] == field->value[n]) if (value[n] == field->value[n])
continue; continue;
} }
hid_process_event(hid, field, &field->usage[n], value[n], regs); hid_process_event(hid, field, &field->usage[n], value[n], regs);
continue; continue;
} }
...@@ -934,7 +933,7 @@ static void hid_irq_in(struct urb *urb, struct pt_regs *regs) ...@@ -934,7 +933,7 @@ static void hid_irq_in(struct urb *urb, struct pt_regs *regs)
default: /* error */ default: /* error */
warn("input irq status %d received", urb->status); warn("input irq status %d received", urb->status);
} }
status = usb_submit_urb(urb, SLAB_ATOMIC); status = usb_submit_urb(urb, SLAB_ATOMIC);
if (status) if (status)
err("can't resubmit intr, %s-%s/input%d, status %d", err("can't resubmit intr, %s-%s/input%d, status %d",
...@@ -956,7 +955,7 @@ static void hid_output_field(struct hid_field *field, __u8 *data) ...@@ -956,7 +955,7 @@ static void hid_output_field(struct hid_field *field, __u8 *data)
for (n = 0; n < count; n++) { for (n = 0; n < count; n++) {
if (field->logical_minimum < 0) /* signed values */ if (field->logical_minimum < 0) /* signed values */
implement(data, offset + n * size, size, s32ton(field->value[n], size)); implement(data, offset + n * size, size, s32ton(field->value[n], size));
else /* unsigned values */ else /* unsigned values */
implement(data, offset + n * size, size, field->value[n]); implement(data, offset + n * size, size, field->value[n]);
} }
} }
...@@ -1118,8 +1117,8 @@ static int hid_submit_ctrl(struct hid_device *hid) ...@@ -1118,8 +1117,8 @@ static int hid_submit_ctrl(struct hid_device *hid)
hid->cr->wLength = cpu_to_le16(len); hid->cr->wLength = cpu_to_le16(len);
dbg("submitting ctrl urb: %s wValue=0x%04x wIndex=0x%04x wLength=%u", dbg("submitting ctrl urb: %s wValue=0x%04x wIndex=0x%04x wLength=%u",
hid->cr->bRequest == HID_REQ_SET_REPORT ? "Set_Report" : "Get_Report", hid->cr->bRequest == HID_REQ_SET_REPORT ? "Set_Report" : "Get_Report",
hid->cr->wValue, hid->cr->wIndex, hid->cr->wLength); hid->cr->wValue, hid->cr->wIndex, hid->cr->wLength);
if (usb_submit_urb(hid->urbctrl, GFP_ATOMIC)) { if (usb_submit_urb(hid->urbctrl, GFP_ATOMIC)) {
err("usb_submit_urb(ctrl) failed"); err("usb_submit_urb(ctrl) failed");
...@@ -1186,7 +1185,7 @@ static void hid_ctrl(struct urb *urb, struct pt_regs *regs) ...@@ -1186,7 +1185,7 @@ static void hid_ctrl(struct urb *urb, struct pt_regs *regs)
switch (urb->status) { switch (urb->status) {
case 0: /* success */ case 0: /* success */
if (hid->ctrl[hid->ctrltail].dir == USB_DIR_IN) if (hid->ctrl[hid->ctrltail].dir == USB_DIR_IN)
hid_input_report(hid->ctrl[hid->ctrltail].report->type, urb, regs); hid_input_report(hid->ctrl[hid->ctrltail].report->type, urb, regs);
case -ESHUTDOWN: /* unplug */ case -ESHUTDOWN: /* unplug */
case -EILSEQ: /* unplug timectrl on uhci */ case -EILSEQ: /* unplug timectrl on uhci */
...@@ -1405,11 +1404,11 @@ void hid_init_reports(struct hid_device *hid) ...@@ -1405,11 +1404,11 @@ void hid_init_reports(struct hid_device *hid)
#define USB_DEVICE_ID_WACOM_INTUOS 0x0020 #define USB_DEVICE_ID_WACOM_INTUOS 0x0020
#define USB_DEVICE_ID_WACOM_PL 0x0030 #define USB_DEVICE_ID_WACOM_PL 0x0030
#define USB_DEVICE_ID_WACOM_INTUOS2 0x0040 #define USB_DEVICE_ID_WACOM_INTUOS2 0x0040
#define USB_DEVICE_ID_WACOM_VOLITO 0x0060 #define USB_DEVICE_ID_WACOM_VOLITO 0x0060
#define USB_DEVICE_ID_WACOM_PTU 0x0003 #define USB_DEVICE_ID_WACOM_PTU 0x0003
#define USB_VENDOR_ID_KBGEAR 0x084e #define USB_VENDOR_ID_KBGEAR 0x084e
#define USB_DEVICE_ID_KBGEAR_JAMSTUDIO 0x1001 #define USB_DEVICE_ID_KBGEAR_JAMSTUDIO 0x1001
#define USB_VENDOR_ID_AIPTEK 0x08ca #define USB_VENDOR_ID_AIPTEK 0x08ca
#define USB_DEVICE_ID_AIPTEK_01 0x0001 #define USB_DEVICE_ID_AIPTEK_01 0x0001
...@@ -1424,33 +1423,33 @@ void hid_init_reports(struct hid_device *hid) ...@@ -1424,33 +1423,33 @@ void hid_init_reports(struct hid_device *hid)
#define USB_DEVICE_ID_POWERMATE 0x0410 #define USB_DEVICE_ID_POWERMATE 0x0410
#define USB_DEVICE_ID_SOUNDKNOB 0x04AA #define USB_DEVICE_ID_SOUNDKNOB 0x04AA
#define USB_VENDOR_ID_ATEN 0x0557 #define USB_VENDOR_ID_ATEN 0x0557
#define USB_DEVICE_ID_ATEN_UC100KM 0x2004 #define USB_DEVICE_ID_ATEN_UC100KM 0x2004
#define USB_DEVICE_ID_ATEN_CS124U 0x2202 #define USB_DEVICE_ID_ATEN_CS124U 0x2202
#define USB_DEVICE_ID_ATEN_2PORTKVM 0x2204 #define USB_DEVICE_ID_ATEN_2PORTKVM 0x2204
#define USB_DEVICE_ID_ATEN_4PORTKVM 0x2205 #define USB_DEVICE_ID_ATEN_4PORTKVM 0x2205
#define USB_DEVICE_ID_ATEN_4PORTKVMC 0x2208 #define USB_DEVICE_ID_ATEN_4PORTKVMC 0x2208
#define USB_VENDOR_ID_TOPMAX 0x0663 #define USB_VENDOR_ID_TOPMAX 0x0663
#define USB_DEVICE_ID_TOPMAX_COBRAPAD 0x0103 #define USB_DEVICE_ID_TOPMAX_COBRAPAD 0x0103
#define USB_VENDOR_ID_HAPP 0x078b #define USB_VENDOR_ID_HAPP 0x078b
#define USB_DEVICE_ID_UGCI_DRIVING 0x0010 #define USB_DEVICE_ID_UGCI_DRIVING 0x0010
#define USB_DEVICE_ID_UGCI_FLYING 0x0020 #define USB_DEVICE_ID_UGCI_FLYING 0x0020
#define USB_DEVICE_ID_UGCI_FIGHTING 0x0030 #define USB_DEVICE_ID_UGCI_FIGHTING 0x0030
#define USB_VENDOR_ID_MGE 0x0463 #define USB_VENDOR_ID_MGE 0x0463
#define USB_DEVICE_ID_MGE_UPS 0xffff #define USB_DEVICE_ID_MGE_UPS 0xffff
#define USB_DEVICE_ID_MGE_UPS1 0x0001 #define USB_DEVICE_ID_MGE_UPS1 0x0001
#define USB_VENDOR_ID_ONTRAK 0x0a07 #define USB_VENDOR_ID_ONTRAK 0x0a07
#define USB_DEVICE_ID_ONTRAK_ADU100 0x0064 #define USB_DEVICE_ID_ONTRAK_ADU100 0x0064
#define USB_VENDOR_ID_TANGTOP 0x0d3d #define USB_VENDOR_ID_TANGTOP 0x0d3d
#define USB_DEVICE_ID_TANGTOP_USBPS2 0x0001 #define USB_DEVICE_ID_TANGTOP_USBPS2 0x0001
#define USB_VENDOR_ID_ESSENTIAL_REALITY 0x0d7f #define USB_VENDOR_ID_ESSENTIAL_REALITY 0x0d7f
#define USB_DEVICE_ID_ESSENTIAL_REALITY_P5 0x0100 #define USB_DEVICE_ID_ESSENTIAL_REALITY_P5 0x0100
#define USB_VENDOR_ID_A4TECH 0x09DA #define USB_VENDOR_ID_A4TECH 0x09DA
#define USB_DEVICE_ID_A4TECH_WCP32PU 0x0006 #define USB_DEVICE_ID_A4TECH_WCP32PU 0x0006
...@@ -1494,6 +1493,14 @@ void hid_init_reports(struct hid_device *hid) ...@@ -1494,6 +1493,14 @@ void hid_init_reports(struct hid_device *hid)
#define USB_VENDOR_ID_DELORME 0x1163 #define USB_VENDOR_ID_DELORME 0x1163
#define USB_DEVICE_ID_DELORME_EARTHMATE 0x0100 #define USB_DEVICE_ID_DELORME_EARTHMATE 0x0100
#define USB_VENDOR_ID_MCC 0x09db
#define USB_DEVICE_ID_MCC_PMD1024LS 0x0076
#define USB_DEVICE_ID_MCC_PMD1208LS 0x007a
/*
* Alphabetically sorted blacklist by quirk type.
*/
static struct hid_blacklist { static struct hid_blacklist {
__u16 idVendor; __u16 idVendor;
__u16 idProduct; __u16 idProduct;
...@@ -1512,9 +1519,9 @@ static struct hid_blacklist { ...@@ -1512,9 +1519,9 @@ static struct hid_blacklist {
{ USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW24, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW24, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW48, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW48, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW28, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW28, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_HIDCOM, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EARTHMATE, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_GLAB, USB_DEVICE_ID_4_PHIDGETSERVO_30, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_4_PHIDGETSERVO_30, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_GLAB, USB_DEVICE_ID_1_PHIDGETSERVO_30, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_1_PHIDGETSERVO_30, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_GLAB, USB_DEVICE_ID_8_8_8_IF_KIT, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_8_8_8_IF_KIT, HID_QUIRK_IGNORE },
...@@ -1522,6 +1529,9 @@ static struct hid_blacklist { ...@@ -1522,6 +1529,9 @@ static struct hid_blacklist {
{ USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_8_8_IF_KIT, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_8_8_IF_KIT, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_SOUNDKNOB, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_SOUNDKNOB, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_MCC, USB_DEVICE_ID_MCC_PMD1024LS, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_MCC, USB_DEVICE_ID_MCC_PMD1208LS, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS1, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS1, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100, HID_QUIRK_IGNORE },
...@@ -1557,7 +1567,6 @@ static struct hid_blacklist { ...@@ -1557,7 +1567,6 @@ static struct hid_blacklist {
{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PTU, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PTU, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_4_PHIDGETSERVO_20, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_4_PHIDGETSERVO_20, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_1_PHIDGETSERVO_20, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_1_PHIDGETSERVO_20, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM, HID_QUIRK_NOGET }, { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM, HID_QUIRK_NOGET },
{ USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS124U, HID_QUIRK_NOGET }, { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS124U, HID_QUIRK_NOGET },
...@@ -1568,7 +1577,6 @@ static struct hid_blacklist { ...@@ -1568,7 +1577,6 @@ static struct hid_blacklist {
{ USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 }, { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 },
{ USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE, HID_QUIRK_2WHEEL_MOUSE_HACK_5 }, { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE, HID_QUIRK_2WHEEL_MOUSE_HACK_5 },
{ USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_HIDCOM, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_ALPS, USB_DEVICE_ID_IBM_GAMEPAD, HID_QUIRK_BADPAD }, { USB_VENDOR_ID_ALPS, USB_DEVICE_ID_IBM_GAMEPAD, HID_QUIRK_BADPAD },
{ USB_VENDOR_ID_CHIC, USB_DEVICE_ID_CHIC_GAMEPAD, HID_QUIRK_BADPAD }, { USB_VENDOR_ID_CHIC, USB_DEVICE_ID_CHIC_GAMEPAD, HID_QUIRK_BADPAD },
...@@ -1579,13 +1587,6 @@ static struct hid_blacklist { ...@@ -1579,13 +1587,6 @@ static struct hid_blacklist {
{ USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RUMBLEPAD, HID_QUIRK_BADPAD }, { USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RUMBLEPAD, HID_QUIRK_BADPAD },
{ USB_VENDOR_ID_TOPMAX, USB_DEVICE_ID_TOPMAX_COBRAPAD, HID_QUIRK_BADPAD }, { USB_VENDOR_ID_TOPMAX, USB_DEVICE_ID_TOPMAX_COBRAPAD, HID_QUIRK_BADPAD },
{ USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW40, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW24, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW48, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW28, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EARTHMATE, HID_QUIRK_IGNORE },
{ 0, 0 } { 0, 0 }
}; };
...@@ -1724,7 +1725,7 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf) ...@@ -1724,7 +1725,7 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
} }
init_waitqueue_head(&hid->wait); init_waitqueue_head(&hid->wait);
spin_lock_init(&hid->outlock); spin_lock_init(&hid->outlock);
spin_lock_init(&hid->ctrllock); spin_lock_init(&hid->ctrllock);
...@@ -1746,9 +1747,9 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf) ...@@ -1746,9 +1747,9 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
} else if (usb_string(dev, dev->descriptor.iProduct, buf, 64) > 0) { } else if (usb_string(dev, dev->descriptor.iProduct, buf, 64) > 0) {
snprintf(hid->name, 128, "%s", buf); snprintf(hid->name, 128, "%s", buf);
} else } else
snprintf(hid->name, 128, "%04x:%04x", snprintf(hid->name, 128, "%04x:%04x",
le16_to_cpu(dev->descriptor.idVendor), le16_to_cpu(dev->descriptor.idVendor),
le16_to_cpu(dev->descriptor.idProduct)); le16_to_cpu(dev->descriptor.idProduct));
usb_make_path(dev, buf, 64); usb_make_path(dev, buf, 64);
snprintf(hid->phys, 64, "%s/input%d", buf, snprintf(hid->phys, 64, "%s/input%d", buf,
...@@ -1892,7 +1893,7 @@ static int hid_resume(struct usb_interface *intf) ...@@ -1892,7 +1893,7 @@ static int hid_resume(struct usb_interface *intf)
static struct usb_device_id hid_usb_ids [] = { static struct usb_device_id hid_usb_ids [] = {
{ .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS, { .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS,
.bInterfaceClass = USB_INTERFACE_CLASS_HID }, .bInterfaceClass = USB_INTERFACE_CLASS_HID },
{ } /* Terminating entry */ { } /* Terminating entry */
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment