summaryrefslogtreecommitdiffstats
path: root/drivers/tty/cyclades.c
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2016-01-11 01:40:54 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-01-27 18:01:44 -0500
commitfdfb719e93b55a50f90da2059dc450e7c0c48e8f (patch)
tree5317736293b5c7c16673df42d4542b78a70831aa /drivers/tty/cyclades.c
parent582e20a03b9bcbddaeaffb38800323ddcc4a9173 (diff)
tty: Remove chars_in_buffer() line discipline method
The chars_in_buffer() line discipline method serves no functional purpose, other than as a (dubious) debugging aid for mostly bit-rotting drivers. Despite being documented as an optional method, every caller is unconditionally executed (although conditionally compiled). Furthermore, direct tty->ldisc access without an ldisc ref is unsafe. Lastly, N_TTY's chars_in_buffer() has warned of removal since 3.12. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/cyclades.c')
-rw-r--r--drivers/tty/cyclades.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/tty/cyclades.c b/drivers/tty/cyclades.c
index abbed201dc74..a48e7e66b970 100644
--- a/drivers/tty/cyclades.c
+++ b/drivers/tty/cyclades.c
@@ -2852,8 +2852,8 @@ static void cy_throttle(struct tty_struct *tty)
2852 unsigned long flags; 2852 unsigned long flags;
2853 2853
2854#ifdef CY_DEBUG_THROTTLE 2854#ifdef CY_DEBUG_THROTTLE
2855 printk(KERN_DEBUG "cyc:throttle %s: %ld...ttyC%d\n", tty_name(tty), 2855 printk(KERN_DEBUG "cyc:throttle %s ...ttyC%d\n", tty_name(tty),
2856 tty->ldisc.chars_in_buffer(tty), info->line); 2856 info->line);
2857#endif 2857#endif
2858 2858
2859 if (serial_paranoia_check(info, tty->name, "cy_throttle")) 2859 if (serial_paranoia_check(info, tty->name, "cy_throttle"))
@@ -2891,8 +2891,8 @@ static void cy_unthrottle(struct tty_struct *tty)
2891 unsigned long flags; 2891 unsigned long flags;
2892 2892
2893#ifdef CY_DEBUG_THROTTLE 2893#ifdef CY_DEBUG_THROTTLE
2894 printk(KERN_DEBUG "cyc:unthrottle %s: %ld...ttyC%d\n", 2894 printk(KERN_DEBUG "cyc:unthrottle %s ...ttyC%d\n",
2895 tty_name(tty), tty_chars_in_buffer(tty), info->line); 2895 tty_name(tty), info->line);
2896#endif 2896#endif
2897 2897
2898 if (serial_paranoia_check(info, tty->name, "cy_unthrottle")) 2898 if (serial_paranoia_check(info, tty->name, "cy_unthrottle"))