aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/cyberjack.c
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2011-11-06 13:06:30 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-15 13:35:27 -0500
commitfd11961a2deaf4220ca90ce734439b4006db2911 (patch)
treef18e3a656eb93b01fe3238ba2b014add9a85b034 /drivers/usb/serial/cyberjack.c
parentb7195188e9884f62efd96a3a91415418cb44381f (diff)
USB: serial: remove unnecessary bulk-urb re-fills
Remove unnecessary re-fills of bulk urbs whose fields have not changed since port probe. Compile-only tested. Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/cyberjack.c')
-rw-r--r--drivers/usb/serial/cyberjack.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c
index 2b220e811bf1..98bf83349838 100644
--- a/drivers/usb/serial/cyberjack.c
+++ b/drivers/usb/serial/cyberjack.c
@@ -207,7 +207,6 @@ static void cyberjack_close(struct usb_serial_port *port)
207static int cyberjack_write(struct tty_struct *tty, 207static int cyberjack_write(struct tty_struct *tty,
208 struct usb_serial_port *port, const unsigned char *buf, int count) 208 struct usb_serial_port *port, const unsigned char *buf, int count)
209{ 209{
210 struct usb_serial *serial = port->serial;
211 struct cyberjack_private *priv = usb_get_serial_port_data(port); 210 struct cyberjack_private *priv = usb_get_serial_port_data(port);
212 unsigned long flags; 211 unsigned long flags;
213 int result; 212 int result;
@@ -260,13 +259,7 @@ static int cyberjack_write(struct tty_struct *tty,
260 priv->wrsent = length; 259 priv->wrsent = length;
261 260
262 /* set up our urb */ 261 /* set up our urb */
263 usb_fill_bulk_urb(port->write_urb, serial->dev, 262 port->write_urb->transfer_buffer_length = length;
264 usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress),
265 port->write_urb->transfer_buffer, length,
266 ((serial->type->write_bulk_callback) ?
267 serial->type->write_bulk_callback :
268 cyberjack_write_bulk_callback),
269 port);
270 263
271 /* send the data out the bulk port */ 264 /* send the data out the bulk port */
272 result = usb_submit_urb(port->write_urb, GFP_ATOMIC); 265 result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
@@ -447,13 +440,7 @@ static void cyberjack_write_bulk_callback(struct urb *urb)
447 priv->wrsent += length; 440 priv->wrsent += length;
448 441
449 /* set up our urb */ 442 /* set up our urb */
450 usb_fill_bulk_urb(port->write_urb, port->serial->dev, 443 port->write_urb->transfer_buffer_length = length;
451 usb_sndbulkpipe(port->serial->dev, port->bulk_out_endpointAddress),
452 port->write_urb->transfer_buffer, length,
453 ((port->serial->type->write_bulk_callback) ?
454 port->serial->type->write_bulk_callback :
455 cyberjack_write_bulk_callback),
456 port);
457 444
458 /* send the data out the bulk port */ 445 /* send the data out the bulk port */
459 result = usb_submit_urb(port->write_urb, GFP_ATOMIC); 446 result = usb_submit_urb(port->write_urb, GFP_ATOMIC);