]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/class/cdc-acm.c
iwlwifi: refactor setting tx power
[linux-2.6-omap-h63xx.git] / drivers / usb / class / cdc-acm.c
index d9b40811392179c717076f0404293ff0c5386f14..63c34043b4d91e0bfb2864672704be838f518fef 100644 (file)
@@ -260,10 +260,10 @@ static void acm_ctrl_irq(struct urb *urb)
        case -ENOENT:
        case -ESHUTDOWN:
                /* this urb is terminated, clean up */
-               dbg("%s - urb shutting down with status: %d", __FUNCTION__, status);
+               dbg("%s - urb shutting down with status: %d", __func__, status);
                return;
        default:
-               dbg("%s - nonzero urb status received: %d", __FUNCTION__, status);
+               dbg("%s - nonzero urb status received: %d", __func__, status);
                goto exit;
        }
 
@@ -280,7 +280,7 @@ static void acm_ctrl_irq(struct urb *urb)
 
                case USB_CDC_NOTIFY_SERIAL_STATE:
 
-                       newctrl = le16_to_cpu(get_unaligned((__le16 *) data));
+                       newctrl = get_unaligned_le16(data);
 
                        if (acm->tty && !acm->clocal && (acm->ctrlin & ~newctrl & ACM_CTRL_DCD)) {
                                dbg("calling hangup");
@@ -307,7 +307,7 @@ exit:
        retval = usb_submit_urb (urb, GFP_ATOMIC);
        if (retval)
                err ("%s - usb_submit_urb failed with result %d",
-                    __FUNCTION__, retval);
+                    __func__, retval);
 }
 
 /* data interface returns incoming bytes, or we got unthrottled */
@@ -443,7 +443,7 @@ urbs:
 static void acm_write_bulk(struct urb *urb)
 {
        struct acm *acm;
-       struct acm_wb *wb = (struct acm_wb *)urb->context;
+       struct acm_wb *wb = urb->context;
 
        dbg("Entering acm_write_bulk with status %d", urb->status);
 
@@ -804,7 +804,7 @@ static int acm_probe (struct usb_interface *intf,
 {
        struct usb_cdc_union_desc *union_header = NULL;
        struct usb_cdc_country_functional_desc *cfd = NULL;
-       char *buffer = intf->altsetting->extra;
+       unsigned char *buffer = intf->altsetting->extra;
        int buflen = intf->altsetting->extralen;
        struct usb_interface *control_interface;
        struct usb_interface *data_interface;
@@ -881,9 +881,13 @@ static int acm_probe (struct usb_interface *intf,
                                if ((call_management_function & 3) != 3)
                                        err("This device cannot do calls on its own. It is no modem.");
                                break;
-                               
                        default:
-                               err("Ignoring extra header, type %d, length %d", buffer[2], buffer[0]);
+                               /* there are LOTS more CDC descriptors that
+                                * could legitimately be found here.
+                                */
+                               dev_dbg(&intf->dev, "Ignoring descriptor: "
+                                               "type %02x, length %d\n",
+                                               buffer[2], buffer[0]);
                                break;
                        }
 next_desc:
@@ -1244,6 +1248,9 @@ static struct usb_device_id acm_ids[] = {
        { USB_DEVICE(0x22b8, 0x7000), /* Motorola Q Phone */
        .driver_info = NO_UNION_NORMAL, /* has no union descriptor */
        },
+       { USB_DEVICE(0x0803, 0x3095), /* Zoom Telephonics Model 3095F USB MODEM */
+       .driver_info = NO_UNION_NORMAL, /* has no union descriptor */
+       },
 
        /* control interfaces with various AT-command sets */
        { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,