aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/class/cdc-acm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
-rw-r--r--drivers/usb/class/cdc-acm.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index d9c2b8dafd67..fab23ee8702b 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -326,8 +326,8 @@ exit:
326 usb_mark_last_busy(acm->dev); 326 usb_mark_last_busy(acm->dev);
327 retval = usb_submit_urb (urb, GFP_ATOMIC); 327 retval = usb_submit_urb (urb, GFP_ATOMIC);
328 if (retval) 328 if (retval)
329 err ("%s - usb_submit_urb failed with result %d", 329 dev_err(&urb->dev->dev, "%s - usb_submit_urb failed with "
330 __func__, retval); 330 "result %d", __func__, retval);
331} 331}
332 332
333/* data interface returns incoming bytes, or we got unthrottled */ 333/* data interface returns incoming bytes, or we got unthrottled */
@@ -514,7 +514,7 @@ static void acm_waker(struct work_struct *waker)
514 514
515 rv = usb_autopm_get_interface(acm->control); 515 rv = usb_autopm_get_interface(acm->control);
516 if (rv < 0) { 516 if (rv < 0) {
517 err("Autopm failure in %s", __func__); 517 dev_err(&acm->dev->dev, "Autopm failure in %s\n", __func__);
518 return; 518 return;
519 } 519 }
520 if (acm->delayed_wb) { 520 if (acm->delayed_wb) {
@@ -924,7 +924,7 @@ static int acm_probe (struct usb_interface *intf,
924 924
925 /* normal probing*/ 925 /* normal probing*/
926 if (!buffer) { 926 if (!buffer) {
927 err("Weird descriptor references\n"); 927 dev_err(&intf->dev, "Weird descriptor references\n");
928 return -EINVAL; 928 return -EINVAL;
929 } 929 }
930 930
@@ -934,21 +934,24 @@ static int acm_probe (struct usb_interface *intf,
934 buflen = intf->cur_altsetting->endpoint->extralen; 934 buflen = intf->cur_altsetting->endpoint->extralen;
935 buffer = intf->cur_altsetting->endpoint->extra; 935 buffer = intf->cur_altsetting->endpoint->extra;
936 } else { 936 } else {
937 err("Zero length descriptor references\n"); 937 dev_err(&intf->dev,
938 "Zero length descriptor references\n");
938 return -EINVAL; 939 return -EINVAL;
939 } 940 }
940 } 941 }
941 942
942 while (buflen > 0) { 943 while (buflen > 0) {
943 if (buffer [1] != USB_DT_CS_INTERFACE) { 944 if (buffer [1] != USB_DT_CS_INTERFACE) {
944 err("skipping garbage\n"); 945 dev_err(&intf->dev, "skipping garbage\n");
945 goto next_desc; 946 goto next_desc;
946 } 947 }
947 948
948 switch (buffer [2]) { 949 switch (buffer [2]) {
949 case USB_CDC_UNION_TYPE: /* we've found it */ 950 case USB_CDC_UNION_TYPE: /* we've found it */
950 if (union_header) { 951 if (union_header) {
951 err("More than one union descriptor, skipping ..."); 952 dev_err(&intf->dev, "More than one "
953 "union descriptor, "
954 "skipping ...\n");
952 goto next_desc; 955 goto next_desc;
953 } 956 }
954 union_header = (struct usb_cdc_union_desc *) 957 union_header = (struct usb_cdc_union_desc *)
@@ -966,7 +969,9 @@ static int acm_probe (struct usb_interface *intf,
966 call_management_function = buffer[3]; 969 call_management_function = buffer[3];
967 call_interface_num = buffer[4]; 970 call_interface_num = buffer[4];
968 if ((call_management_function & 3) != 3) 971 if ((call_management_function & 3) != 3)
969 err("This device cannot do calls on its own. It is no modem."); 972 dev_err(&intf->dev, "This device "
973 "cannot do calls on its own. "
974 "It is no modem.\n");
970 break; 975 break;
971 default: 976 default:
972 /* there are LOTS more CDC descriptors that 977 /* there are LOTS more CDC descriptors that
@@ -1051,7 +1056,7 @@ skip_normal_probe:
1051 for (minor = 0; minor < ACM_TTY_MINORS && acm_table[minor]; minor++); 1056 for (minor = 0; minor < ACM_TTY_MINORS && acm_table[minor]; minor++);
1052 1057
1053 if (minor == ACM_TTY_MINORS) { 1058 if (minor == ACM_TTY_MINORS) {
1054 err("no more free acm devices"); 1059 dev_err(&intf->dev, "no more free acm devices\n");
1055 return -ENODEV; 1060 return -ENODEV;
1056 } 1061 }
1057 1062