Commit fab2462a authored by Vojtech Pavlik's avatar Vojtech Pavlik

Minor endianness and debugging fixes. Most thanks to Dave Miller.

parent 8598f48b
......@@ -879,7 +879,7 @@ static int hid_input_report(int type, struct urb *urb)
{
int i;
printk(KERN_DEBUG __FILE__ ": report %d (size %u) = ", n, len);
for (i = 0; i < n; i++)
for (i = 0; i < len; i++)
printk(" %02x", data[i]);
printk("\n");
}
......@@ -1384,7 +1384,7 @@ static struct hid_device *usb_hid_configure(struct usb_device *dev, int ifnum)
#ifdef DEBUG_DATA
printk(KERN_DEBUG __FILE__ ": report descriptor (size %u, read %d) = ", rsize, n);
for (n = 0; n < rsize; n++)
printk(" %02x", (unsigned) rdesc[n]);
printk(" %02x", (unsigned char) rdesc[n]);
printk("\n");
#endif
......@@ -1432,7 +1432,7 @@ static struct hid_device *usb_hid_configure(struct usb_device *dev, int ifnum)
hid->outlock = SPIN_LOCK_UNLOCKED;
hid->ctrllock = SPIN_LOCK_UNLOCKED;
hid->version = hdesc->bcdHID;
hid->version = le16_to_cpu(hdesc->bcdHID);
hid->country = hdesc->bCountryCode;
hid->dev = dev;
hid->ifnum = interface->bInterfaceNumber;
......
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