diff options
-rw-r--r-- | drivers/isdn/capi/capi.c | 9 | ||||
-rw-r--r-- | drivers/misc/pti.c | 6 | ||||
-rw-r--r-- | drivers/mmc/card/sdio_uart.c | 9 | ||||
-rw-r--r-- | drivers/tty/nozomi.c | 8 |
4 files changed, 9 insertions, 23 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index e44933d58790..94948be5d366 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c | |||
@@ -1015,14 +1015,11 @@ capinc_tty_install(struct tty_driver *driver, struct tty_struct *tty) | |||
1015 | { | 1015 | { |
1016 | int idx = tty->index; | 1016 | int idx = tty->index; |
1017 | struct capiminor *mp = capiminor_get(idx); | 1017 | struct capiminor *mp = capiminor_get(idx); |
1018 | int ret = tty_init_termios(tty); | 1018 | int ret = tty_standard_install(driver, tty); |
1019 | 1019 | ||
1020 | if (ret == 0) { | 1020 | if (ret == 0) |
1021 | tty_driver_kref_get(driver); | ||
1022 | tty->count++; | ||
1023 | tty->driver_data = mp; | 1021 | tty->driver_data = mp; |
1024 | driver->ttys[idx] = tty; | 1022 | else |
1025 | } else | ||
1026 | capiminor_put(mp); | 1023 | capiminor_put(mp); |
1027 | return ret; | 1024 | return ret; |
1028 | } | 1025 | } |
diff --git a/drivers/misc/pti.c b/drivers/misc/pti.c index 0b56e3f43573..471ff4c85cd8 100644 --- a/drivers/misc/pti.c +++ b/drivers/misc/pti.c | |||
@@ -481,13 +481,9 @@ static int pti_tty_install(struct tty_driver *driver, struct tty_struct *tty) | |||
481 | { | 481 | { |
482 | int idx = tty->index; | 482 | int idx = tty->index; |
483 | struct pti_tty *pti_tty_data; | 483 | struct pti_tty *pti_tty_data; |
484 | int ret = tty_init_termios(tty); | 484 | int ret = tty_standard_install(driver, tty); |
485 | 485 | ||
486 | if (ret == 0) { | 486 | if (ret == 0) { |
487 | tty_driver_kref_get(driver); | ||
488 | tty->count++; | ||
489 | driver->ttys[idx] = tty; | ||
490 | |||
491 | pti_tty_data = kmalloc(sizeof(struct pti_tty), GFP_KERNEL); | 487 | pti_tty_data = kmalloc(sizeof(struct pti_tty), GFP_KERNEL); |
492 | if (pti_tty_data == NULL) | 488 | if (pti_tty_data == NULL) |
493 | return -ENOMEM; | 489 | return -ENOMEM; |
diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c index 2c151e18c9e8..bd4a67cdac3f 100644 --- a/drivers/mmc/card/sdio_uart.c +++ b/drivers/mmc/card/sdio_uart.c | |||
@@ -750,15 +750,12 @@ static int sdio_uart_install(struct tty_driver *driver, struct tty_struct *tty) | |||
750 | { | 750 | { |
751 | int idx = tty->index; | 751 | int idx = tty->index; |
752 | struct sdio_uart_port *port = sdio_uart_port_get(idx); | 752 | struct sdio_uart_port *port = sdio_uart_port_get(idx); |
753 | int ret = tty_init_termios(tty); | 753 | int ret = tty_standard_install(driver, tty); |
754 | 754 | ||
755 | if (ret == 0) { | 755 | if (ret == 0) |
756 | tty_driver_kref_get(driver); | ||
757 | tty->count++; | ||
758 | /* This is the ref sdio_uart_port get provided */ | 756 | /* This is the ref sdio_uart_port get provided */ |
759 | tty->driver_data = port; | 757 | tty->driver_data = port; |
760 | driver->ttys[idx] = tty; | 758 | else |
761 | } else | ||
762 | sdio_uart_port_put(port); | 759 | sdio_uart_port_put(port); |
763 | return ret; | 760 | return ret; |
764 | } | 761 | } |
diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c index fd347ff34d07..580da78b2d86 100644 --- a/drivers/tty/nozomi.c +++ b/drivers/tty/nozomi.c | |||
@@ -1602,13 +1602,9 @@ static int ntty_install(struct tty_driver *driver, struct tty_struct *tty) | |||
1602 | int ret; | 1602 | int ret; |
1603 | if (!port || !dc || dc->state != NOZOMI_STATE_READY) | 1603 | if (!port || !dc || dc->state != NOZOMI_STATE_READY) |
1604 | return -ENODEV; | 1604 | return -ENODEV; |
1605 | ret = tty_init_termios(tty); | 1605 | ret = tty_standard_install(driver, tty); |
1606 | if (ret == 0) { | 1606 | if (ret == 0) |
1607 | tty_driver_kref_get(driver); | ||
1608 | tty->count++; | ||
1609 | tty->driver_data = port; | 1607 | tty->driver_data = port; |
1610 | driver->ttys[tty->index] = tty; | ||
1611 | } | ||
1612 | return ret; | 1608 | return ret; |
1613 | } | 1609 | } |
1614 | 1610 | ||