diff options
-rw-r--r-- | drivers/input/tablet/gtco.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c index 89a297801dce..fed555bf9ff7 100644 --- a/drivers/input/tablet/gtco.c +++ b/drivers/input/tablet/gtco.c | |||
@@ -2,8 +2,6 @@ | |||
2 | 2 | ||
3 | GTCO digitizer USB driver | 3 | GTCO digitizer USB driver |
4 | 4 | ||
5 | Use the err() and dbg() macros from usb.h for system logging | ||
6 | |||
7 | TO CHECK: Is pressure done right on report 5? | 5 | TO CHECK: Is pressure done right on report 5? |
8 | 6 | ||
9 | Copyright (C) 2006 GTCO CalComp | 7 | Copyright (C) 2006 GTCO CalComp |
@@ -808,7 +806,8 @@ static void gtco_urb_callback(struct urb *urbinfo) | |||
808 | resubmit: | 806 | resubmit: |
809 | rc = usb_submit_urb(urbinfo, GFP_ATOMIC); | 807 | rc = usb_submit_urb(urbinfo, GFP_ATOMIC); |
810 | if (rc != 0) | 808 | if (rc != 0) |
811 | err("usb_submit_urb failed rc=0x%x", rc); | 809 | dev_err(&device->usbdev->dev, |
810 | "usb_submit_urb failed rc=0x%x\n", rc); | ||
812 | } | 811 | } |
813 | 812 | ||
814 | /* | 813 | /* |
@@ -838,7 +837,7 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
838 | gtco = kzalloc(sizeof(struct gtco), GFP_KERNEL); | 837 | gtco = kzalloc(sizeof(struct gtco), GFP_KERNEL); |
839 | input_dev = input_allocate_device(); | 838 | input_dev = input_allocate_device(); |
840 | if (!gtco || !input_dev) { | 839 | if (!gtco || !input_dev) { |
841 | err("No more memory"); | 840 | dev_err(&usbinterface->dev, "No more memory\n"); |
842 | error = -ENOMEM; | 841 | error = -ENOMEM; |
843 | goto err_free_devs; | 842 | goto err_free_devs; |
844 | } | 843 | } |
@@ -853,7 +852,7 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
853 | gtco->buffer = usb_alloc_coherent(gtco->usbdev, REPORT_MAX_SIZE, | 852 | gtco->buffer = usb_alloc_coherent(gtco->usbdev, REPORT_MAX_SIZE, |
854 | GFP_KERNEL, >co->buf_dma); | 853 | GFP_KERNEL, >co->buf_dma); |
855 | if (!gtco->buffer) { | 854 | if (!gtco->buffer) { |
856 | err("No more memory for us buffers"); | 855 | dev_err(&usbinterface->dev, "No more memory for us buffers\n"); |
857 | error = -ENOMEM; | 856 | error = -ENOMEM; |
858 | goto err_free_devs; | 857 | goto err_free_devs; |
859 | } | 858 | } |
@@ -861,7 +860,7 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
861 | /* Allocate URB for reports */ | 860 | /* Allocate URB for reports */ |
862 | gtco->urbinfo = usb_alloc_urb(0, GFP_KERNEL); | 861 | gtco->urbinfo = usb_alloc_urb(0, GFP_KERNEL); |
863 | if (!gtco->urbinfo) { | 862 | if (!gtco->urbinfo) { |
864 | err("Failed to allocate URB"); | 863 | dev_err(&usbinterface->dev, "Failed to allocate URB\n"); |
865 | error = -ENOMEM; | 864 | error = -ENOMEM; |
866 | goto err_free_buf; | 865 | goto err_free_buf; |
867 | } | 866 | } |
@@ -888,7 +887,8 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
888 | */ | 887 | */ |
889 | if (usb_get_extra_descriptor(usbinterface->cur_altsetting, | 888 | if (usb_get_extra_descriptor(usbinterface->cur_altsetting, |
890 | HID_DEVICE_TYPE, &hid_desc) != 0){ | 889 | HID_DEVICE_TYPE, &hid_desc) != 0){ |
891 | err("Can't retrieve exta USB descriptor to get hid report descriptor length"); | 890 | dev_err(&usbinterface->dev, |
891 | "Can't retrieve exta USB descriptor to get hid report descriptor length\n"); | ||
892 | error = -EIO; | 892 | error = -EIO; |
893 | goto err_free_urb; | 893 | goto err_free_urb; |
894 | } | 894 | } |
@@ -898,7 +898,7 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
898 | 898 | ||
899 | report = kzalloc(le16_to_cpu(hid_desc->wDescriptorLength), GFP_KERNEL); | 899 | report = kzalloc(le16_to_cpu(hid_desc->wDescriptorLength), GFP_KERNEL); |
900 | if (!report) { | 900 | if (!report) { |
901 | err("No more memory for report"); | 901 | dev_err(&usbinterface->dev, "No more memory for report\n"); |
902 | error = -ENOMEM; | 902 | error = -ENOMEM; |
903 | goto err_free_urb; | 903 | goto err_free_urb; |
904 | } | 904 | } |
@@ -926,8 +926,9 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
926 | 926 | ||
927 | /* If we didn't get the report, fail */ | 927 | /* If we didn't get the report, fail */ |
928 | if (result != le16_to_cpu(hid_desc->wDescriptorLength)) { | 928 | if (result != le16_to_cpu(hid_desc->wDescriptorLength)) { |
929 | err("Failed to get HID Report Descriptor of size: %d", | 929 | dev_err(&usbinterface->dev, |
930 | hid_desc->wDescriptorLength); | 930 | "Failed to get HID Report Descriptor of size: %d\n", |
931 | hid_desc->wDescriptorLength); | ||
931 | error = -EIO; | 932 | error = -EIO; |
932 | goto err_free_urb; | 933 | goto err_free_urb; |
933 | } | 934 | } |