diff options
Diffstat (limited to 'drivers/input/tablet/gtco.c')
-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 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; |