From: Johan Hovold Date: Sun, 6 Nov 2011 18:06:29 +0000 (+0100) Subject: USB: serial: remove unnecessary reinitialisations of urb fields X-Git-Tag: MMI-PSA29.97-13-9~17726^2~78 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b7195188e9884f62efd96a3a91415418cb44381f;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git USB: serial: remove unnecessary reinitialisations of urb fields Remove unnecessary reinitialisations of completion and context fields of urbs. Compile-only tested. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index 29fba8ccf8e2..589f11a0f7e2 100644 --- a/drivers/usb/serial/io_ti.c +++ b/drivers/usb/serial/io_ti.c @@ -1951,7 +1951,6 @@ static int edge_open(struct tty_struct *tty, struct usb_serial_port *port) status = -EINVAL; goto release_es_lock; } - urb->complete = edge_interrupt_callback; urb->context = edge_serial; status = usb_submit_urb(urb, GFP_KERNEL); if (status) { @@ -1978,7 +1977,6 @@ static int edge_open(struct tty_struct *tty, struct usb_serial_port *port) goto unlink_int_urb; } edge_port->ep_read_urb_state = EDGE_READ_URB_RUNNING; - urb->complete = edge_bulk_in_callback; urb->context = edge_port; status = usb_submit_urb(urb, GFP_KERNEL); if (status) { @@ -2257,8 +2255,6 @@ static int restart_read(struct edgeport_port *edge_port) if (edge_port->ep_read_urb_state == EDGE_READ_URB_STOPPED) { urb = edge_port->port->read_urb; - urb->complete = edge_bulk_in_callback; - urb->context = edge_port; status = usb_submit_urb(urb, GFP_ATOMIC); } edge_port->ep_read_urb_state = EDGE_READ_URB_RUNNING; diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index 6d16717ef4f7..4af21f46096e 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c @@ -535,7 +535,6 @@ static int ti_open(struct tty_struct *tty, struct usb_serial_port *port) status = -EINVAL; goto release_lock; } - urb->complete = ti_interrupt_callback; urb->context = tdev; status = usb_submit_urb(urb, GFP_KERNEL); if (status) { @@ -618,7 +617,6 @@ static int ti_open(struct tty_struct *tty, struct usb_serial_port *port) goto unlink_int_urb; } tport->tp_read_urb_state = TI_READ_URB_RUNNING; - urb->complete = ti_bulk_in_callback; urb->context = tport; status = usb_submit_urb(urb, GFP_KERNEL); if (status) { @@ -1571,7 +1569,6 @@ static int ti_restart_read(struct ti_port *tport, struct tty_struct *tty) tport->tp_read_urb_state = TI_READ_URB_RUNNING; urb = tport->tp_port->read_urb; spin_unlock_irqrestore(&tport->tp_lock, flags); - urb->complete = ti_bulk_in_callback; urb->context = tport; status = usb_submit_urb(urb, GFP_KERNEL); } else {