Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 333396fc authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

USB: opticon: increase bulk-in size



Use 256 byte bulk-in buffers rather than double end-point sized ones.

Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e32d82bc
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -492,7 +492,7 @@ static int opticon_port_probe(struct usb_serial_port *port)
	if (!priv->bulk_read_urb)
	if (!priv->bulk_read_urb)
		goto error;
		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);
	priv->bulk_in_buffer = kmalloc(priv->buffer_size, GFP_KERNEL);
	if (!priv->bulk_in_buffer)
	if (!priv->bulk_in_buffer)
		goto error;
		goto error;
@@ -559,6 +559,7 @@ static struct usb_serial_driver opticon_device = {
	},
	},
	.id_table =		id_table,
	.id_table =		id_table,
	.num_ports =		1,
	.num_ports =		1,
	.bulk_in_size =		256,
	.attach =		opticon_startup,
	.attach =		opticon_startup,
	.port_probe =		opticon_port_probe,
	.port_probe =		opticon_port_probe,
	.port_remove =		opticon_port_remove,
	.port_remove =		opticon_port_remove,