Skip to content

Commit

Permalink
cdc-acm: remove is_int_ep from acm structure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ladislav Michl authored and Greg Kroah-Hartman committed Nov 21, 2016
1 parent 74bccc9 commit d305394
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions drivers/usb/class/cdc-acm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1337,8 +1337,7 @@ static int acm_probe(struct usb_interface *intf,
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 {
Expand Down Expand Up @@ -1382,7 +1381,7 @@ static int acm_probe(struct usb_interface *intf,

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,
Expand Down
1 change: 0 additions & 1 deletion drivers/usb/class/cdc-acm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d305394

Please sign in to comment.