]> git.neil.brown.name Git - history.git/commitdiff
I did find one bug, hid_submit_ctrl() does not cpu_to_le16()
authorDavid S. Miller <davem@redhat.com>
Tue, 27 Aug 2002 10:43:59 +0000 (12:43 +0200)
committerVojtech Pavlik <vojtech@suse.cz>
Tue, 27 Aug 2002 10:43:59 +0000 (12:43 +0200)
all the control request fields properly.

drivers/usb/input/hid-core.c

index b5743d2ac59bbf0954facf2379ba1ad0750df4e1..3ab85bfdbdcb5f8926d4234c0a1e3b7019a17685 100644 (file)
@@ -1073,7 +1073,7 @@ static int hid_submit_ctrl(struct hid_device *hid)
 
        hid->cr.bRequestType = USB_TYPE_CLASS | USB_RECIP_INTERFACE | dir;
        hid->cr.bRequest = (dir == USB_DIR_OUT) ? HID_REQ_SET_REPORT : HID_REQ_GET_REPORT;
-       hid->cr.wValue = ((report->type + 1) << 8) | report->id;
+       hid->cr.wValue = cpu_to_le16(((report->type + 1) << 8) | report->id);
        hid->cr.wIndex = cpu_to_le16(hid->ifnum);
        hid->cr.wLength = cpu_to_le16(hid->urbctrl->transfer_buffer_length);