diff options
Diffstat (limited to 'drivers/usb/serial/opticon.c')
-rw-r--r-- | drivers/usb/serial/opticon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c index 96423f3c8ef3..c248a9147439 100644 --- a/drivers/usb/serial/opticon.c +++ b/drivers/usb/serial/opticon.c | |||
@@ -523,7 +523,7 @@ static int opticon_startup(struct usb_serial *serial) | |||
523 | goto error; | 523 | goto error; |
524 | } | 524 | } |
525 | 525 | ||
526 | priv->buffer_size = le16_to_cpu(endpoint->wMaxPacketSize) * 2; | 526 | priv->buffer_size = usb_endpoint_maxp(endpoint) * 2; |
527 | priv->bulk_in_buffer = kmalloc(priv->buffer_size, GFP_KERNEL); | 527 | priv->bulk_in_buffer = kmalloc(priv->buffer_size, GFP_KERNEL); |
528 | if (!priv->bulk_in_buffer) { | 528 | if (!priv->bulk_in_buffer) { |
529 | dev_err(&priv->udev->dev, "out of memory\n"); | 529 | dev_err(&priv->udev->dev, "out of memory\n"); |