From 5833041f1b130e5823a99d03b14538282e5ad345 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Sun, 6 Nov 2011 19:06:28 +0100 Subject: USB: serial: remove unnecessary reinitialisations of urb->dev Remove unnecessary reinitialisations of urb->dev before each submission, which were based on the (no longer valid) assumption that serial->dev will be set to NULL on close. Compile-only tested. Cc: Matthias Bruestle and Harald Welte Cc: Lonnie Mendez Cc: Peter Berger Cc: Al Borchers Cc: Support Department Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/cyberjack.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'drivers/usb/serial/cyberjack.c') diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c index 5a41252807cb..2b220e811bf1 100644 --- a/drivers/usb/serial/cyberjack.c +++ b/drivers/usb/serial/cyberjack.c @@ -138,7 +138,6 @@ static int cyberjack_startup(struct usb_serial *serial) for (i = 0; i < serial->num_ports; ++i) { int result; - serial->port[i]->interrupt_in_urb->dev = serial->dev; result = usb_submit_urb(serial->port[i]->interrupt_in_urb, GFP_KERNEL); if (result) @@ -347,7 +346,6 @@ static void cyberjack_read_int_callback(struct urb *urb) spin_unlock(&priv->lock); if (!old_rdtodo) { - port->read_urb->dev = port->serial->dev; result = usb_submit_urb(port->read_urb, GFP_ATOMIC); if (result) dev_err(&port->dev, "%s - failed resubmitting " @@ -358,7 +356,6 @@ static void cyberjack_read_int_callback(struct urb *urb) } resubmit: - port->interrupt_in_urb->dev = port->serial->dev; result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); if (result) dev_err(&port->dev, "usb_submit_urb(read int) failed\n"); @@ -411,7 +408,6 @@ static void cyberjack_read_bulk_callback(struct urb *urb) /* Continue to read if we have still urbs to do. */ if (todo /* || (urb->actual_length==port->bulk_in_endpointAddress)*/) { - port->read_urb->dev = port->serial->dev; result = usb_submit_urb(port->read_urb, GFP_ATOMIC); if (result) dev_err(&port->dev, "%s - failed resubmitting read " -- cgit v1.2.3