Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338691
b: refs/heads/master
c: 3157fad
h: refs/heads/master
i:
  338689: 7c4fe5b
  338687: 4410a75
v: v3
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Nov 21, 2012
1 parent 111ffc5 commit 90f3a8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e29a7738c531ba33a70cbf78809fb3dc5a0a42db
refs/heads/master: 3157fad9ad6dbc97ee0ba2d6ada256370841c77a
10 changes: 4 additions & 6 deletions trunk/drivers/usb/serial/opticon.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ MODULE_DEVICE_TABLE(usb, id_table);

/* This structure holds all of the individual device information */
struct opticon_private {
struct usb_device *udev;
struct usb_serial *serial;
struct usb_serial_port *port;
unsigned char *bulk_in_buffer;
Expand Down Expand Up @@ -185,7 +184,7 @@ static int opticon_open(struct tty_struct *tty, struct usb_serial_port *port)
send_control_msg(port, CONTROL_RTS, 0);

/* clear the halt status of the enpoint */
usb_clear_halt(priv->udev, priv->bulk_read_urb->pipe);
usb_clear_halt(port->serial->dev, priv->bulk_read_urb->pipe);

result = usb_submit_urb(priv->bulk_read_urb, GFP_KERNEL);
if (result)
Expand Down Expand Up @@ -487,7 +486,6 @@ static int opticon_startup(struct usb_serial *serial)
spin_lock_init(&priv->lock);
priv->serial = serial;
priv->port = serial->port[0];
priv->udev = serial->dev;
priv->outstanding_urbs = 0; /* Init the outstanding urbs */

/* find our bulk endpoint */
Expand All @@ -501,14 +499,14 @@ static int opticon_startup(struct usb_serial *serial)

priv->bulk_read_urb = usb_alloc_urb(0, GFP_KERNEL);
if (!priv->bulk_read_urb) {
dev_err(&priv->udev->dev, "out of memory\n");
dev_err(&serial->dev->dev, "out of memory\n");
goto error;
}

priv->buffer_size = usb_endpoint_maxp(endpoint) * 2;
priv->bulk_in_buffer = kmalloc(priv->buffer_size, GFP_KERNEL);
if (!priv->bulk_in_buffer) {
dev_err(&priv->udev->dev, "out of memory\n");
dev_err(&serial->dev->dev, "out of memory\n");
goto error;
}

Expand All @@ -519,7 +517,7 @@ static int opticon_startup(struct usb_serial *serial)
}

if (!bulk_in_found) {
dev_err(&priv->udev->dev,
dev_err(&serial->dev->dev,
"Error - the proper endpoints were not found!\n");
goto error;
}
Expand Down

0 comments on commit 90f3a8d

Please sign in to comment.