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