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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
582e20a03b
commit
fdfb719e93
@@ -2852,8 +2852,8 @@ static void cy_throttle(struct tty_struct *tty)
|
||||
unsigned long flags;
|
||||
|
||||
#ifdef CY_DEBUG_THROTTLE
|
||||
printk(KERN_DEBUG "cyc:throttle %s: %ld...ttyC%d\n", tty_name(tty),
|
||||
tty->ldisc.chars_in_buffer(tty), info->line);
|
||||
printk(KERN_DEBUG "cyc:throttle %s ...ttyC%d\n", tty_name(tty),
|
||||
info->line);
|
||||
#endif
|
||||
|
||||
if (serial_paranoia_check(info, tty->name, "cy_throttle"))
|
||||
@@ -2891,8 +2891,8 @@ static void cy_unthrottle(struct tty_struct *tty)
|
||||
unsigned long flags;
|
||||
|
||||
#ifdef CY_DEBUG_THROTTLE
|
||||
printk(KERN_DEBUG "cyc:unthrottle %s: %ld...ttyC%d\n",
|
||||
tty_name(tty), tty_chars_in_buffer(tty), info->line);
|
||||
printk(KERN_DEBUG "cyc:unthrottle %s ...ttyC%d\n",
|
||||
tty_name(tty), info->line);
|
||||
#endif
|
||||
|
||||
if (serial_paranoia_check(info, tty->name, "cy_unthrottle"))
|
||||
|
Reference in New Issue
Block a user