diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2016-01-10 23:36:15 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-01-28 17:13:44 -0500 |
commit | 9db276f8f02145068d8c04614bc28c2a4532a8c7 (patch) | |
tree | 981fcf1ce5da9a28fbef9a91ad75a7898bd88e02 /drivers/tty/cyclades.c | |
parent | 5823323ea5ed41ea08ef0a36013369d0c65a23de (diff) |
tty: Use termios c_*flag macros
Expressions of the form "tty->termios.c_*flag & FLAG"
are more clearly expressed with the termios flags macros,
I_FLAG(), C_FLAG(), O_FLAG(), and L_FLAG().
Convert treewide.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Acked-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/cyclades.c')
-rw-r--r-- | drivers/tty/cyclades.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/tty/cyclades.c b/drivers/tty/cyclades.c index a48e7e66b970..d67e542bab1c 100644 --- a/drivers/tty/cyclades.c +++ b/drivers/tty/cyclades.c | |||
@@ -1440,7 +1440,7 @@ static void cy_shutdown(struct cyclades_port *info, struct tty_struct *tty) | |||
1440 | info->port.xmit_buf = NULL; | 1440 | info->port.xmit_buf = NULL; |
1441 | free_page((unsigned long)temp); | 1441 | free_page((unsigned long)temp); |
1442 | } | 1442 | } |
1443 | if (tty->termios.c_cflag & HUPCL) | 1443 | if (C_HUPCL(tty)) |
1444 | cyy_change_rts_dtr(info, 0, TIOCM_RTS | TIOCM_DTR); | 1444 | cyy_change_rts_dtr(info, 0, TIOCM_RTS | TIOCM_DTR); |
1445 | 1445 | ||
1446 | cyy_issue_cmd(info, CyCHAN_CTL | CyDIS_RCVR); | 1446 | cyy_issue_cmd(info, CyCHAN_CTL | CyDIS_RCVR); |
@@ -1469,7 +1469,7 @@ static void cy_shutdown(struct cyclades_port *info, struct tty_struct *tty) | |||
1469 | free_page((unsigned long)temp); | 1469 | free_page((unsigned long)temp); |
1470 | } | 1470 | } |
1471 | 1471 | ||
1472 | if (tty->termios.c_cflag & HUPCL) | 1472 | if (C_HUPCL(tty)) |
1473 | tty_port_lower_dtr_rts(&info->port); | 1473 | tty_port_lower_dtr_rts(&info->port); |
1474 | 1474 | ||
1475 | set_bit(TTY_IO_ERROR, &tty->flags); | 1475 | set_bit(TTY_IO_ERROR, &tty->flags); |
@@ -2795,8 +2795,7 @@ static void cy_set_termios(struct tty_struct *tty, struct ktermios *old_termios) | |||
2795 | 2795 | ||
2796 | cy_set_line_char(info, tty); | 2796 | cy_set_line_char(info, tty); |
2797 | 2797 | ||
2798 | if ((old_termios->c_cflag & CRTSCTS) && | 2798 | if ((old_termios->c_cflag & CRTSCTS) && !C_CRTSCTS(tty)) { |
2799 | !(tty->termios.c_cflag & CRTSCTS)) { | ||
2800 | tty->hw_stopped = 0; | 2799 | tty->hw_stopped = 0; |
2801 | cy_start(tty); | 2800 | cy_start(tty); |
2802 | } | 2801 | } |
@@ -2807,8 +2806,7 @@ static void cy_set_termios(struct tty_struct *tty, struct ktermios *old_termios) | |||
2807 | * XXX It's not clear whether the current behavior is correct | 2806 | * XXX It's not clear whether the current behavior is correct |
2808 | * or not. Hence, this may change..... | 2807 | * or not. Hence, this may change..... |
2809 | */ | 2808 | */ |
2810 | if (!(old_termios->c_cflag & CLOCAL) && | 2809 | if (!(old_termios->c_cflag & CLOCAL) && C_CLOCAL(tty)) |
2811 | (tty->termios.c_cflag & CLOCAL)) | ||
2812 | wake_up_interruptible(&info->port.open_wait); | 2810 | wake_up_interruptible(&info->port.open_wait); |
2813 | #endif | 2811 | #endif |
2814 | } /* cy_set_termios */ | 2812 | } /* cy_set_termios */ |
@@ -2868,7 +2866,7 @@ static void cy_throttle(struct tty_struct *tty) | |||
2868 | info->throttle = 1; | 2866 | info->throttle = 1; |
2869 | } | 2867 | } |
2870 | 2868 | ||
2871 | if (tty->termios.c_cflag & CRTSCTS) { | 2869 | if (C_CRTSCTS(tty)) { |
2872 | if (!cy_is_Z(card)) { | 2870 | if (!cy_is_Z(card)) { |
2873 | spin_lock_irqsave(&card->card_lock, flags); | 2871 | spin_lock_irqsave(&card->card_lock, flags); |
2874 | cyy_change_rts_dtr(info, 0, TIOCM_RTS); | 2872 | cyy_change_rts_dtr(info, 0, TIOCM_RTS); |
@@ -2905,7 +2903,7 @@ static void cy_unthrottle(struct tty_struct *tty) | |||
2905 | cy_send_xchar(tty, START_CHAR(tty)); | 2903 | cy_send_xchar(tty, START_CHAR(tty)); |
2906 | } | 2904 | } |
2907 | 2905 | ||
2908 | if (tty->termios.c_cflag & CRTSCTS) { | 2906 | if (C_CRTSCTS(tty)) { |
2909 | card = info->card; | 2907 | card = info->card; |
2910 | if (!cy_is_Z(card)) { | 2908 | if (!cy_is_Z(card)) { |
2911 | spin_lock_irqsave(&card->card_lock, flags); | 2909 | spin_lock_irqsave(&card->card_lock, flags); |