summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2010-03-17 23:05:55 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 22:21:34 +0200
commit2db6c7698bbb37128959d3a207fc46e3f45bef3c (patch)
tree1d476b9fde8d8bb9e0d2f624b8104c2a97bcd390 /drivers/usb/serial
parentUSB: serial: remove unnecessary re-initialisation of generic urbs (diff)
downloadlinux-2db6c7698bbb37128959d3a207fc46e3f45bef3c.tar.xz
linux-2db6c7698bbb37128959d3a207fc46e3f45bef3c.zip
USB: cp210x: use generic submit_read_urb at open
There is no need to initialise the read urb as this is done at port probe. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial')
-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) {
static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port)
{
- struct usb_serial *serial = port->serial;
int result;
dbg("%s - port %d", __func__, port->number);
@@ -383,20 +382,9 @@ static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port)
return -EPROTO;
}
- /* Start reading from the device */
- usb_fill_bulk_urb(port->read_urb, serial->dev,
- usb_rcvbulkpipe(serial->dev,
- port->bulk_in_endpointAddress),
- port->read_urb->transfer_buffer,
- port->read_urb->transfer_buffer_length,
- serial->type->read_bulk_callback,
- port);
- result = usb_submit_urb(port->read_urb, GFP_KERNEL);
- if (result) {
- dev_err(&port->dev, "%s - failed resubmitting read urb, "
- "error %d\n", __func__, result);
+ result = usb_serial_generic_submit_read_urb(port, GFP_KERNEL);
+ if (result)
return result;
- }
/* Configure the termios structure */
cp210x_get_termios(tty, port);