aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/n_gsm.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-07-14 10:31:47 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-16 16:00:41 -0400
commitadc8d746caa67fff4b53ba3e5163a6cbacc3b523 (patch)
treee3f6c05f27c163b369ddd4da5f31d2a61bde6d3a /drivers/tty/n_gsm.c
parent6d31a88cb2e01d46c0cb74aa5da529e1f92ae3db (diff)
tty: move the termios object into the tty
This will let us sort out a whole pile of tty related races. The alternative would be to keep points and refcount the termios objects. However 1. They are tiny anyway 2. Many devices don't use the stored copies 3. We can remove a pty special case Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/n_gsm.c')
-rw-r--r--drivers/tty/n_gsm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index c43b683b6eb8..7a4bf3053a15 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -1061,7 +1061,7 @@ static void gsm_process_modem(struct tty_struct *tty, struct gsm_dlci *dlci,
1061 /* Carrier drop -> hangup */ 1061 /* Carrier drop -> hangup */
1062 if (tty) { 1062 if (tty) {
1063 if ((mlines & TIOCM_CD) == 0 && (dlci->modem_rx & TIOCM_CD)) 1063 if ((mlines & TIOCM_CD) == 0 && (dlci->modem_rx & TIOCM_CD))
1064 if (!(tty->termios->c_cflag & CLOCAL)) 1064 if (!(tty->termios.c_cflag & CLOCAL))
1065 tty_hangup(tty); 1065 tty_hangup(tty);
1066 if (brk & 0x01) 1066 if (brk & 0x01)
1067 tty_insert_flip_char(tty, 0, TTY_BREAK); 1067 tty_insert_flip_char(tty, 0, TTY_BREAK);
@@ -3043,13 +3043,13 @@ static void gsmtty_set_termios(struct tty_struct *tty, struct ktermios *old)
3043 the RPN control message. This however rapidly gets nasty as we 3043 the RPN control message. This however rapidly gets nasty as we
3044 then have to remap modem signals each way according to whether 3044 then have to remap modem signals each way according to whether
3045 our virtual cable is null modem etc .. */ 3045 our virtual cable is null modem etc .. */
3046 tty_termios_copy_hw(tty->termios, old); 3046 tty_termios_copy_hw(&tty->termios, old);
3047} 3047}
3048 3048
3049static void gsmtty_throttle(struct tty_struct *tty) 3049static void gsmtty_throttle(struct tty_struct *tty)
3050{ 3050{
3051 struct gsm_dlci *dlci = tty->driver_data; 3051 struct gsm_dlci *dlci = tty->driver_data;
3052 if (tty->termios->c_cflag & CRTSCTS) 3052 if (tty->termios.c_cflag & CRTSCTS)
3053 dlci->modem_tx &= ~TIOCM_DTR; 3053 dlci->modem_tx &= ~TIOCM_DTR;
3054 dlci->throttled = 1; 3054 dlci->throttled = 1;
3055 /* Send an MSC with DTR cleared */ 3055 /* Send an MSC with DTR cleared */
@@ -3059,7 +3059,7 @@ static void gsmtty_throttle(struct tty_struct *tty)
3059static void gsmtty_unthrottle(struct tty_struct *tty) 3059static void gsmtty_unthrottle(struct tty_struct *tty)
3060{ 3060{
3061 struct gsm_dlci *dlci = tty->driver_data; 3061 struct gsm_dlci *dlci = tty->driver_data;
3062 if (tty->termios->c_cflag & CRTSCTS) 3062 if (tty->termios.c_cflag & CRTSCTS)
3063 dlci->modem_tx |= TIOCM_DTR; 3063 dlci->modem_tx |= TIOCM_DTR;
3064 dlci->throttled = 0; 3064 dlci->throttled = 0;
3065 /* Send an MSC with DTR set */ 3065 /* Send an MSC with DTR set */