aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/cp210x.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
index fa4fb5e0cf12..f95a590e1993 100644
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -372,7 +372,6 @@ static unsigned int cp210x_quantise_baudrate(unsigned int baud) {
372 372
373static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port) 373static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port)
374{ 374{
375 struct usb_serial *serial = port->serial;
376 int result; 375 int result;
377 376
378 dbg("%s - port %d", __func__, port->number); 377 dbg("%s - port %d", __func__, port->number);
@@ -383,20 +382,9 @@ static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port)
383 return -EPROTO; 382 return -EPROTO;
384 } 383 }
385 384
386 /* Start reading from the device */ 385 result = usb_serial_generic_submit_read_urb(port, GFP_KERNEL);
387 usb_fill_bulk_urb(port->read_urb, serial->dev, 386 if (result)
388 usb_rcvbulkpipe(serial->dev,
389 port->bulk_in_endpointAddress),
390 port->read_urb->transfer_buffer,
391 port->read_urb->transfer_buffer_length,
392 serial->type->read_bulk_callback,
393 port);
394 result = usb_submit_urb(port->read_urb, GFP_KERNEL);
395 if (result) {
396 dev_err(&port->dev, "%s - failed resubmitting read urb, "
397 "error %d\n", __func__, result);
398 return result; 387 return result;
399 }
400 388
401 /* Configure the termios structure */ 389 /* Configure the termios structure */
402 cp210x_get_termios(tty, port); 390 cp210x_get_termios(tty, port);