View | Details | Raw Unified | Return to bug 2201
Collapse All | Expand All

(-)a/drivers/usb/input/hid-core.c (-3 / +8 lines)
Lines 1275-1283 Link Here
1275
static int hid_get_class_descriptor(struct usb_device *dev, int ifnum,
1275
static int hid_get_class_descriptor(struct usb_device *dev, int ifnum,
1276
		unsigned char type, void *buf, int size)
1276
		unsigned char type, void *buf, int size)
1277
{
1277
{
1278
	return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
1278
	int result, retries = 4;
1279
		USB_REQ_GET_DESCRIPTOR, USB_RECIP_INTERFACE | USB_DIR_IN,
1279
	do {
1280
		(type << 8), ifnum, buf, size, HZ * USB_CTRL_GET_TIMEOUT);
1280
		result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
1281
				USB_REQ_GET_DESCRIPTOR, USB_RECIP_INTERFACE | USB_DIR_IN,
1282
				(type << 8), ifnum, buf, size, HZ * USB_CTRL_GET_TIMEOUT);
1283
		retries--;
1284
	} while (result < 0 && retries);
1285
	return result;
1281
}
1286
}
1282
1287
1283
int hid_open(struct hid_device *hid)
1288
int hid_open(struct hid_device *hid)

Return to bug 2201