diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2008-04-28 07:00:26 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 10:03:31 -0700 |
commit | 6b8588f71890fba78742f90e22390028a6cd706f (patch) | |
tree | 9777c3cdc3fca20703952e1c0743383368109f58 /drivers/input/tablet | |
parent | 24caa6a0c7cde9309026880f8cc7eba587e1272a (diff) | |
download | kernel_samsung_tuna-6b8588f71890fba78742f90e22390028a6cd706f.zip kernel_samsung_tuna-6b8588f71890fba78742f90e22390028a6cd706f.tar.gz kernel_samsung_tuna-6b8588f71890fba78742f90e22390028a6cd706f.tar.bz2 |
usb input endianness annotations and fixes
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/input/tablet')
-rw-r--r-- | drivers/input/tablet/gtco.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c index d2c6da2..f66ca21 100644 --- a/drivers/input/tablet/gtco.c +++ b/drivers/input/tablet/gtco.c @@ -897,7 +897,7 @@ static int gtco_probe(struct usb_interface *usbinterface, dbg("Extra descriptor success: type:%d len:%d", hid_desc->bDescriptorType, hid_desc->wDescriptorLength); - report = kzalloc(hid_desc->wDescriptorLength, GFP_KERNEL); + report = kzalloc(le16_to_cpu(hid_desc->wDescriptorLength), GFP_KERNEL); if (!report) { err("No more memory for report"); error = -ENOMEM; @@ -913,16 +913,16 @@ static int gtco_probe(struct usb_interface *usbinterface, REPORT_DEVICE_TYPE << 8, 0, /* interface */ report, - hid_desc->wDescriptorLength, + le16_to_cpu(hid_desc->wDescriptorLength), 5000); /* 5 secs */ - if (result == hid_desc->wDescriptorLength) + if (result == le16_to_cpu(hid_desc->wDescriptorLength)) break; } /* If we didn't get the report, fail */ dbg("usb_control_msg result: :%d", result); - if (result != hid_desc->wDescriptorLength) { + if (result != le16_to_cpu(hid_desc->wDescriptorLength)) { err("Failed to get HID Report Descriptor of size: %d", hid_desc->wDescriptorLength); error = -EIO; |