Commit b7195188 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: serial: remove unnecessary reinitialisations of urb fields

Remove unnecessary reinitialisations of completion and context fields of
urbs.

Compile-only tested.
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5833041f
...@@ -1951,7 +1951,6 @@ static int edge_open(struct tty_struct *tty, struct usb_serial_port *port) ...@@ -1951,7 +1951,6 @@ static int edge_open(struct tty_struct *tty, struct usb_serial_port *port)
status = -EINVAL; status = -EINVAL;
goto release_es_lock; goto release_es_lock;
} }
urb->complete = edge_interrupt_callback;
urb->context = edge_serial; urb->context = edge_serial;
status = usb_submit_urb(urb, GFP_KERNEL); status = usb_submit_urb(urb, GFP_KERNEL);
if (status) { if (status) {
...@@ -1978,7 +1977,6 @@ static int edge_open(struct tty_struct *tty, struct usb_serial_port *port) ...@@ -1978,7 +1977,6 @@ static int edge_open(struct tty_struct *tty, struct usb_serial_port *port)
goto unlink_int_urb; goto unlink_int_urb;
} }
edge_port->ep_read_urb_state = EDGE_READ_URB_RUNNING; edge_port->ep_read_urb_state = EDGE_READ_URB_RUNNING;
urb->complete = edge_bulk_in_callback;
urb->context = edge_port; urb->context = edge_port;
status = usb_submit_urb(urb, GFP_KERNEL); status = usb_submit_urb(urb, GFP_KERNEL);
if (status) { if (status) {
...@@ -2257,8 +2255,6 @@ static int restart_read(struct edgeport_port *edge_port) ...@@ -2257,8 +2255,6 @@ static int restart_read(struct edgeport_port *edge_port)
if (edge_port->ep_read_urb_state == EDGE_READ_URB_STOPPED) { if (edge_port->ep_read_urb_state == EDGE_READ_URB_STOPPED) {
urb = edge_port->port->read_urb; urb = edge_port->port->read_urb;
urb->complete = edge_bulk_in_callback;
urb->context = edge_port;
status = usb_submit_urb(urb, GFP_ATOMIC); status = usb_submit_urb(urb, GFP_ATOMIC);
} }
edge_port->ep_read_urb_state = EDGE_READ_URB_RUNNING; edge_port->ep_read_urb_state = EDGE_READ_URB_RUNNING;
......
...@@ -535,7 +535,6 @@ static int ti_open(struct tty_struct *tty, struct usb_serial_port *port) ...@@ -535,7 +535,6 @@ static int ti_open(struct tty_struct *tty, struct usb_serial_port *port)
status = -EINVAL; status = -EINVAL;
goto release_lock; goto release_lock;
} }
urb->complete = ti_interrupt_callback;
urb->context = tdev; urb->context = tdev;
status = usb_submit_urb(urb, GFP_KERNEL); status = usb_submit_urb(urb, GFP_KERNEL);
if (status) { if (status) {
...@@ -618,7 +617,6 @@ static int ti_open(struct tty_struct *tty, struct usb_serial_port *port) ...@@ -618,7 +617,6 @@ static int ti_open(struct tty_struct *tty, struct usb_serial_port *port)
goto unlink_int_urb; goto unlink_int_urb;
} }
tport->tp_read_urb_state = TI_READ_URB_RUNNING; tport->tp_read_urb_state = TI_READ_URB_RUNNING;
urb->complete = ti_bulk_in_callback;
urb->context = tport; urb->context = tport;
status = usb_submit_urb(urb, GFP_KERNEL); status = usb_submit_urb(urb, GFP_KERNEL);
if (status) { if (status) {
...@@ -1571,7 +1569,6 @@ static int ti_restart_read(struct ti_port *tport, struct tty_struct *tty) ...@@ -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; tport->tp_read_urb_state = TI_READ_URB_RUNNING;
urb = tport->tp_port->read_urb; urb = tport->tp_port->read_urb;
spin_unlock_irqrestore(&tport->tp_lock, flags); spin_unlock_irqrestore(&tport->tp_lock, flags);
urb->complete = ti_bulk_in_callback;
urb->context = tport; urb->context = tport;
status = usb_submit_urb(urb, GFP_KERNEL); status = usb_submit_urb(urb, GFP_KERNEL);
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment