cdc-acm: remove is_int_ep from acm structure
authorLadislav Michl <ladis@linux-mips.org>
Fri, 18 Nov 2016 18:10:19 +0000 (19:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Nov 2016 10:36:15 +0000 (11:36 +0100)
is_int_ep is used only in acm_probe, no need to store it in device data.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/cdc-acm.c
drivers/usb/class/cdc-acm.h

index e5c8535ce8d71a8fa64928cacd371801b8fd1868..cf2029464ca479745643a59650cda0400b324158 100644 (file)
@@ -1337,8 +1337,7 @@ made_compressed_probe:
        spin_lock_init(&acm->write_lock);
        spin_lock_init(&acm->read_lock);
        mutex_init(&acm->mutex);
-       acm->is_int_ep = usb_endpoint_xfer_int(epread);
-       if (acm->is_int_ep) {
+       if (usb_endpoint_xfer_int(epread)) {
                acm->bInterval = epread->bInterval;
                acm->in = usb_rcvintpipe(usb_dev, epread->bEndpointAddress);
        } else {
@@ -1382,7 +1381,7 @@ made_compressed_probe:
 
                urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
                urb->transfer_dma = rb->dma;
-               if (acm->is_int_ep)
+               if (usb_endpoint_xfer_int(epread))
                        usb_fill_int_urb(urb, acm->dev, acm->in, rb->base,
                                         acm->readsize,
                                         acm_read_bulk_callback, rb,
index 58ddd2509c5b3119e8f59772e79122c18254659a..eca5a5f80a54e3cb5de94fd47db9e9f875fd847b 100644 (file)
@@ -117,7 +117,6 @@ struct acm {
        unsigned int ctrl_caps;                         /* control capabilities from the class specific header */
        unsigned int susp_count;                        /* number of suspended interfaces */
        unsigned int combined_interfaces:1;             /* control and data collapsed */
-       unsigned int is_int_ep:1;                       /* interrupt endpoints contrary to spec used */
        unsigned int throttled:1;                       /* actually throttled */
        unsigned int throttle_req:1;                    /* throttle requested */
        u8 bInterval;