aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2008-04-28 02:00:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 13:03:31 -0400
commit6b8588f71890fba78742f90e22390028a6cd706f (patch)
tree9777c3cdc3fca20703952e1c0743383368109f58 /drivers
parent24caa6a0c7cde9309026880f8cc7eba587e1272a (diff)
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')
-rw-r--r--drivers/input/joystick/iforce/iforce-usb.c2
-rw-r--r--drivers/input/tablet/gtco.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c
index 1457b73850e7..7fb3cf81cfbf 100644
--- a/drivers/input/joystick/iforce/iforce-usb.c
+++ b/drivers/input/joystick/iforce/iforce-usb.c
@@ -159,7 +159,7 @@ static int iforce_usb_probe(struct usb_interface *intf,
159 159
160 iforce->cr.bRequestType = USB_TYPE_VENDOR | USB_DIR_IN | USB_RECIP_INTERFACE; 160 iforce->cr.bRequestType = USB_TYPE_VENDOR | USB_DIR_IN | USB_RECIP_INTERFACE;
161 iforce->cr.wIndex = 0; 161 iforce->cr.wIndex = 0;
162 iforce->cr.wLength = 16; 162 iforce->cr.wLength = cpu_to_le16(16);
163 163
164 usb_fill_int_urb(iforce->irq, dev, usb_rcvintpipe(dev, epirq->bEndpointAddress), 164 usb_fill_int_urb(iforce->irq, dev, usb_rcvintpipe(dev, epirq->bEndpointAddress),
165 iforce->data, 16, iforce_usb_irq, iforce, epirq->bInterval); 165 iforce->data, 16, iforce_usb_irq, iforce, epirq->bInterval);
diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c
index d2c6da264722..f66ca215cdec 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,
897 dbg("Extra descriptor success: type:%d len:%d", 897 dbg("Extra descriptor success: type:%d len:%d",
898 hid_desc->bDescriptorType, hid_desc->wDescriptorLength); 898 hid_desc->bDescriptorType, hid_desc->wDescriptorLength);
899 899
900 report = kzalloc(hid_desc->wDescriptorLength, GFP_KERNEL); 900 report = kzalloc(le16_to_cpu(hid_desc->wDescriptorLength), GFP_KERNEL);
901 if (!report) { 901 if (!report) {
902 err("No more memory for report"); 902 err("No more memory for report");
903 error = -ENOMEM; 903 error = -ENOMEM;
@@ -913,16 +913,16 @@ static int gtco_probe(struct usb_interface *usbinterface,
913 REPORT_DEVICE_TYPE << 8, 913 REPORT_DEVICE_TYPE << 8,
914 0, /* interface */ 914 0, /* interface */
915 report, 915 report,
916 hid_desc->wDescriptorLength, 916 le16_to_cpu(hid_desc->wDescriptorLength),
917 5000); /* 5 secs */ 917 5000); /* 5 secs */
918 918
919 if (result == hid_desc->wDescriptorLength) 919 if (result == le16_to_cpu(hid_desc->wDescriptorLength))
920 break; 920 break;
921 } 921 }
922 922
923 /* If we didn't get the report, fail */ 923 /* If we didn't get the report, fail */
924 dbg("usb_control_msg result: :%d", result); 924 dbg("usb_control_msg result: :%d", result);
925 if (result != hid_desc->wDescriptorLength) { 925 if (result != le16_to_cpu(hid_desc->wDescriptorLength)) {
926 err("Failed to get HID Report Descriptor of size: %d", 926 err("Failed to get HID Report Descriptor of size: %d",
927 hid_desc->wDescriptorLength); 927 hid_desc->wDescriptorLength);
928 error = -EIO; 928 error = -EIO;