aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2008-06-17 12:02:44 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-06-17 12:02:44 -0400
commit15439dd37f92f930ac7fc65a4f261834e4215bb0 (patch)
treeec8e4a7cffd1cbb55ae4970c3172fa9a6fb0c0f7 /drivers/input/tablet
parent39ab9ddeb3e9573a1ea9a17a1431ea5c81681964 (diff)
parent90d95ef617a535a8832bdcb8dee07bf591e5dd82 (diff)
Merge branch 'for-linus' into next
Conflicts: drivers/input/mouse/appletouch.c
Diffstat (limited to 'drivers/input/tablet')
-rw-r--r--drivers/input/tablet/gtco.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c
index c5a8661a1baa..1e748e46d12e 100644
--- a/drivers/input/tablet/gtco.c
+++ b/drivers/input/tablet/gtco.c
@@ -830,7 +830,7 @@ static int gtco_probe(struct usb_interface *usbinterface,
830 struct gtco *gtco; 830 struct gtco *gtco;
831 struct input_dev *input_dev; 831 struct input_dev *input_dev;
832 struct hid_descriptor *hid_desc; 832 struct hid_descriptor *hid_desc;
833 char *report = NULL; 833 char *report;
834 int result = 0, retry; 834 int result = 0, retry;
835 int error; 835 int error;
836 struct usb_endpoint_descriptor *endpoint; 836 struct usb_endpoint_descriptor *endpoint;
@@ -916,12 +916,16 @@ static int gtco_probe(struct usb_interface *usbinterface,
916 le16_to_cpu(hid_desc->wDescriptorLength), 916 le16_to_cpu(hid_desc->wDescriptorLength),
917 5000); /* 5 secs */ 917 5000); /* 5 secs */
918 918
919 if (result == le16_to_cpu(hid_desc->wDescriptorLength)) 919 dbg("usb_control_msg result: %d", result);
920 if (result == le16_to_cpu(hid_desc->wDescriptorLength)) {
921 parse_hid_report_descriptor(gtco, report, result);
920 break; 922 break;
923 }
921 } 924 }
922 925
926 kfree(report);
927
923 /* If we didn't get the report, fail */ 928 /* If we didn't get the report, fail */
924 dbg("usb_control_msg result: :%d", result);
925 if (result != le16_to_cpu(hid_desc->wDescriptorLength)) { 929 if (result != le16_to_cpu(hid_desc->wDescriptorLength)) {
926 err("Failed to get HID Report Descriptor of size: %d", 930 err("Failed to get HID Report Descriptor of size: %d",
927 hid_desc->wDescriptorLength); 931 hid_desc->wDescriptorLength);
@@ -929,12 +933,6 @@ static int gtco_probe(struct usb_interface *usbinterface,
929 goto err_free_urb; 933 goto err_free_urb;
930 } 934 }
931 935
932 /* Now we parse the report */
933 parse_hid_report_descriptor(gtco, report, result);
934
935 /* Now we delete it */
936 kfree(report);
937
938 /* Create a device file node */ 936 /* Create a device file node */
939 usb_make_path(gtco->usbdev, gtco->usbpath, sizeof(gtco->usbpath)); 937 usb_make_path(gtco->usbdev, gtco->usbpath, sizeof(gtco->usbpath));
940 strlcat(gtco->usbpath, "/input0", sizeof(gtco->usbpath)); 938 strlcat(gtco->usbpath, "/input0", sizeof(gtco->usbpath));
@@ -988,7 +986,6 @@ static int gtco_probe(struct usb_interface *usbinterface,
988 usb_buffer_free(gtco->usbdev, REPORT_MAX_SIZE, 986 usb_buffer_free(gtco->usbdev, REPORT_MAX_SIZE,
989 gtco->buffer, gtco->buf_dma); 987 gtco->buffer, gtco->buf_dma);
990 err_free_devs: 988 err_free_devs:
991 kfree(report);
992 input_free_device(input_dev); 989 input_free_device(input_dev);
993 kfree(gtco); 990 kfree(gtco);
994 return error; 991 return error;