aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/whiteheat.c
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2011-11-06 13:06:28 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-15 13:33:16 -0500
commit5833041f1b130e5823a99d03b14538282e5ad345 (patch)
tree394caf266125dd725d47470a11cb5840040130ec /drivers/usb/serial/whiteheat.c
parent016af7ec49836342c3b35166792c8d73a360571c (diff)
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 <support@reiner-sct.com> Cc: Lonnie Mendez <dignome@gmail.com> Cc: Peter Berger <pberger@brimson.com> Cc: Al Borchers <alborchers@steinerpoint.com> Cc: Support Department <support@connecttech.com> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/whiteheat.c')
-rw-r--r--drivers/usb/serial/whiteheat.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index 7eb360b1f8b9..11af903cb09f 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -702,7 +702,6 @@ static void whiteheat_close(struct usb_serial_port *port)
702static int whiteheat_write(struct tty_struct *tty, 702static int whiteheat_write(struct tty_struct *tty,
703 struct usb_serial_port *port, const unsigned char *buf, int count) 703 struct usb_serial_port *port, const unsigned char *buf, int count)
704{ 704{
705 struct usb_serial *serial = port->serial;
706 struct whiteheat_private *info = usb_get_serial_port_data(port); 705 struct whiteheat_private *info = usb_get_serial_port_data(port);
707 struct whiteheat_urb_wrap *wrap; 706 struct whiteheat_urb_wrap *wrap;
708 struct urb *urb; 707 struct urb *urb;
@@ -738,7 +737,6 @@ static int whiteheat_write(struct tty_struct *tty,
738 usb_serial_debug_data(debug, &port->dev, 737 usb_serial_debug_data(debug, &port->dev,
739 __func__, bytes, urb->transfer_buffer); 738 __func__, bytes, urb->transfer_buffer);
740 739
741 urb->dev = serial->dev;
742 urb->transfer_buffer_length = bytes; 740 urb->transfer_buffer_length = bytes;
743 result = usb_submit_urb(urb, GFP_ATOMIC); 741 result = usb_submit_urb(urb, GFP_ATOMIC);
744 if (result) { 742 if (result) {
@@ -984,7 +982,6 @@ static void command_port_read_callback(struct urb *urb)
984 dbg("%s - bad reply from firmware", __func__); 982 dbg("%s - bad reply from firmware", __func__);
985 983
986 /* Continue trying to always read */ 984 /* Continue trying to always read */
987 command_port->read_urb->dev = command_port->serial->dev;
988 result = usb_submit_urb(command_port->read_urb, GFP_ATOMIC); 985 result = usb_submit_urb(command_port->read_urb, GFP_ATOMIC);
989 if (result) 986 if (result)
990 dbg("%s - failed resubmitting read urb, error %d", 987 dbg("%s - failed resubmitting read urb, error %d",
@@ -1090,7 +1087,6 @@ static int firm_send_command(struct usb_serial_port *port, __u8 command,
1090 transfer_buffer[0] = command; 1087 transfer_buffer[0] = command;
1091 memcpy(&transfer_buffer[1], data, datasize); 1088 memcpy(&transfer_buffer[1], data, datasize);
1092 command_port->write_urb->transfer_buffer_length = datasize + 1; 1089 command_port->write_urb->transfer_buffer_length = datasize + 1;
1093 command_port->write_urb->dev = port->serial->dev;
1094 retval = usb_submit_urb(command_port->write_urb, GFP_NOIO); 1090 retval = usb_submit_urb(command_port->write_urb, GFP_NOIO);
1095 if (retval) { 1091 if (retval) {
1096 dbg("%s - submit urb failed", __func__); 1092 dbg("%s - submit urb failed", __func__);
@@ -1311,7 +1307,6 @@ static int start_command_port(struct usb_serial *serial)
1311 /* Work around HCD bugs */ 1307 /* Work around HCD bugs */
1312 usb_clear_halt(serial->dev, command_port->read_urb->pipe); 1308 usb_clear_halt(serial->dev, command_port->read_urb->pipe);
1313 1309
1314 command_port->read_urb->dev = serial->dev;
1315 retval = usb_submit_urb(command_port->read_urb, GFP_KERNEL); 1310 retval = usb_submit_urb(command_port->read_urb, GFP_KERNEL);
1316 if (retval) { 1311 if (retval) {
1317 dev_err(&serial->dev->dev, 1312 dev_err(&serial->dev->dev,
@@ -1359,7 +1354,6 @@ static int start_port_read(struct usb_serial_port *port)
1359 list_del(tmp); 1354 list_del(tmp);
1360 wrap = list_entry(tmp, struct whiteheat_urb_wrap, list); 1355 wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
1361 urb = wrap->urb; 1356 urb = wrap->urb;
1362 urb->dev = port->serial->dev;
1363 spin_unlock_irqrestore(&info->lock, flags); 1357 spin_unlock_irqrestore(&info->lock, flags);
1364 retval = usb_submit_urb(urb, GFP_KERNEL); 1358 retval = usb_submit_urb(urb, GFP_KERNEL);
1365 if (retval) { 1359 if (retval) {
@@ -1439,7 +1433,6 @@ static void rx_data_softint(struct work_struct *work)
1439 sent += tty_insert_flip_string(tty, 1433 sent += tty_insert_flip_string(tty,
1440 urb->transfer_buffer, urb->actual_length); 1434 urb->transfer_buffer, urb->actual_length);
1441 1435
1442 urb->dev = port->serial->dev;
1443 result = usb_submit_urb(urb, GFP_ATOMIC); 1436 result = usb_submit_urb(urb, GFP_ATOMIC);
1444 if (result) { 1437 if (result) {
1445 dev_err(&port->dev, 1438 dev_err(&port->dev,