Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163873
b: refs/heads/master
c: 7e29bb4
h: refs/heads/master
i:
  163871: 89c2d07
v: v3
  • Loading branch information
Alan Stern authored and Live-CD User committed Sep 19, 2009
1 parent c0cdfe4 commit c79627f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 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: cc56cd0157753c04a987888a2f793803df661a40
refs/heads/master: 7e29bb4b779f4f35385e6f21994758845bf14d23
22 changes: 10 additions & 12 deletions trunk/drivers/usb/serial/usb-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,22 +210,21 @@ static int serial_install(struct tty_driver *driver, struct tty_struct *tty)
if (!try_module_get(serial->type->driver.owner))
goto error_module_get;

/* perform the standard setup */
retval = tty_init_termios(tty);
if (retval)
goto error_init_termios;

retval = usb_autopm_get_interface(serial->interface);
if (retval)
goto error_get_interface;

/* If the termios setup has yet to be done */
if (tty->driver->termios[idx] == NULL) {
/* perform the standard setup */
retval = tty_init_termios(tty);
if (retval)
goto error_init_termios;
/* allow the driver to update it */
if (serial->type->init_termios)
serial->type->init_termios(tty);
}
mutex_unlock(&serial->disc_mutex);

/* allow the driver to update the settings */
if (serial->type->init_termios)
serial->type->init_termios(tty);

tty->driver_data = port;

/* Final install (we use the default method) */
Expand All @@ -234,9 +233,8 @@ static int serial_install(struct tty_driver *driver, struct tty_struct *tty)
driver->ttys[idx] = tty;
return retval;

error_init_termios:
usb_autopm_put_interface(serial->interface);
error_get_interface:
error_init_termios:
module_put(serial->type->driver.owner);
error_module_get:
error_no_port:
Expand Down

0 comments on commit c79627f

Please sign in to comment.