From d95af0b96e6a7f43e75a0549641d13d4021aa8c6 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Mon, 30 Jan 2012 21:14:29 +0100 Subject: [PATCH] --- yaml --- r: 289271 b: refs/heads/master c: 76f82a7ab3a724791d184e74529e96ad6947a98f h: refs/heads/master i: 289269: db1d36c8bd510222abac59fac5b7af0ab4dd07b6 289267: d084525484c8b84fc35e726a638ee31ac7b1f56b 289263: 1f4c0da7888f5080315831e53d231b6264dddcce v: v3 --- [refs] | 2 +- trunk/drivers/usb/serial/usb-serial.c | 16 ++++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 12ab1cb9a154..9412789770e6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 66d450e84ec656ec4b774c41cd8d46b3e48d51df +refs/heads/master: 76f82a7ab3a724791d184e74529e96ad6947a98f diff --git a/trunk/drivers/usb/serial/usb-serial.c b/trunk/drivers/usb/serial/usb-serial.c index 611b206591cb..1e30cc92719c 100644 --- a/trunk/drivers/usb/serial/usb-serial.c +++ b/trunk/drivers/usb/serial/usb-serial.c @@ -214,15 +214,14 @@ 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; + retval = tty_standard_install(driver, tty); + if (retval) + goto error_init_termios; + mutex_unlock(&serial->disc_mutex); /* allow the driver to update the settings */ @@ -231,14 +230,11 @@ static int serial_install(struct tty_driver *driver, struct tty_struct *tty) tty->driver_data = port; - /* Final install (we use the default method) */ - tty_driver_kref_get(driver); - tty->count++; - driver->ttys[idx] = tty; return retval; - error_get_interface: error_init_termios: + usb_autopm_put_interface(serial->interface); + error_get_interface: module_put(serial->type->driver.owner); error_module_get: error_no_port: