From fa7501e57e9bf869cb6718a2699f05fc2807cbf1 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Wed, 5 May 2021 11:19:18 +0200 Subject: tty: remove tty_operations::chars_in_buffer for non-buffering The only user of tty_ops::chars_in_buffer is tty_chars_in_buffer. And it considers tty_ops::chars_in_buffer optional. In case it's NULL, zero is returned. So remove all those chars_in_buffer from tty_ops which return zero. (Zero means such driver doesn't buffer.) Signed-off-by: Jiri Slaby Cc: Richard Henderson Acked-by: Max Filippov # xtensa Cc: Ivan Kokshaysky Cc: Matt Turner Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Chris Zankel Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Link: https://lore.kernel.org/r/20210505091928.22010-26-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman --- arch/alpha/kernel/srmcons.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'arch/alpha') diff --git a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c index 2110b7e7f988..fc03471a0b0f 100644 --- a/arch/alpha/kernel/srmcons.c +++ b/arch/alpha/kernel/srmcons.c @@ -148,12 +148,6 @@ srmcons_write_room(struct tty_struct *tty) return 512; } -static int -srmcons_chars_in_buffer(struct tty_struct *tty) -{ - return 0; -} - static int srmcons_open(struct tty_struct *tty, struct file *filp) { @@ -200,7 +194,6 @@ static const struct tty_operations srmcons_ops = { .close = srmcons_close, .write = srmcons_write, .write_room = srmcons_write_room, - .chars_in_buffer= srmcons_chars_in_buffer, }; static int __init -- cgit v1.2.3