summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-10 18:23:43 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-10 18:25:27 (GMT)
commit5a22e30def8b9539576ff047adb14455ca559f07 (patch)
treee1e76efd73b28e7ae8124383c263fcf92bcc11e0 /drivers/usb
parent19e00f2f1d5273dbc52eab0ebc315cae3aa44b2a (diff)
parent418a936e84e8f346da322c2e839992aa9df108d4 (diff)
downloadlinux-fsl-qoriq-5a22e30def8b9539576ff047adb14455ca559f07.tar.xz
Merge tag 'tty-3.3-rc3' tty-next
This is needed to handle the 8250 file merge mess properly for future patches. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/usb-serial.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 611b206..1e30cc9 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/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: