Skip to content

Commit

Permalink
USB: opticon: increase bulk-in size
Browse files Browse the repository at this point in the history
Use 256 byte bulk-in buffers rather than double end-point sized ones.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Nov 21, 2012
1 parent e32d82b commit 333396f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/usb/serial/opticon.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ static int opticon_port_probe(struct usb_serial_port *port)
if (!priv->bulk_read_urb)
goto error;

priv->buffer_size = 2 * port->bulk_in_size;
priv->buffer_size = port->bulk_in_size;
priv->bulk_in_buffer = kmalloc(priv->buffer_size, GFP_KERNEL);
if (!priv->bulk_in_buffer)
goto error;
Expand Down Expand Up @@ -559,6 +559,7 @@ static struct usb_serial_driver opticon_device = {
},
.id_table = id_table,
.num_ports = 1,
.bulk_in_size = 256,
.attach = opticon_startup,
.port_probe = opticon_port_probe,
.port_remove = opticon_port_remove,
Expand Down

0 comments on commit 333396f

Please sign in to comment.