tty: remove empty tty_operations::set_termios

tty_operations::set_termios is optional. If it doesn't exist, nothing is
called. So remove almost¹ empty set_termios implementations.

¹ capi had an useless pr_debug in it.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Karsten Keil <isdn@linux-pingi.de>
Acked-By: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Link: https://lore.kernel.org/r/20210505091928.22010-32-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Jiri Slaby 2021-05-05 11:19:24 +02:00 committed by Greg Kroah-Hartman
parent 4fb266e197
commit 4da872befc
5 changed files with 0 additions and 14 deletions

View File

@ -211,11 +211,6 @@ out_up:
return ret; return ret;
} }
void line_set_termios(struct tty_struct *tty, struct ktermios * old)
{
/* nothing */
}
void line_throttle(struct tty_struct *tty) void line_throttle(struct tty_struct *tty)
{ {
struct line *line = tty->driver_data; struct line *line = tty->driver_data;

View File

@ -66,7 +66,6 @@ extern int line_setup(char **conf, unsigned nlines, char **def,
char *init, char *name); char *init, char *name);
extern int line_write(struct tty_struct *tty, const unsigned char *buf, extern int line_write(struct tty_struct *tty, const unsigned char *buf,
int len); int len);
extern void line_set_termios(struct tty_struct *tty, struct ktermios * old);
extern unsigned int line_chars_in_buffer(struct tty_struct *tty); extern unsigned int line_chars_in_buffer(struct tty_struct *tty);
extern void line_flush_buffer(struct tty_struct *tty); extern void line_flush_buffer(struct tty_struct *tty);
extern void line_flush_chars(struct tty_struct *tty); extern void line_flush_chars(struct tty_struct *tty);

View File

@ -99,7 +99,6 @@ static const struct tty_operations ssl_ops = {
.chars_in_buffer = line_chars_in_buffer, .chars_in_buffer = line_chars_in_buffer,
.flush_buffer = line_flush_buffer, .flush_buffer = line_flush_buffer,
.flush_chars = line_flush_chars, .flush_chars = line_flush_chars,
.set_termios = line_set_termios,
.throttle = line_throttle, .throttle = line_throttle,
.unthrottle = line_unthrottle, .unthrottle = line_unthrottle,
.install = ssl_install, .install = ssl_install,

View File

@ -106,7 +106,6 @@ static const struct tty_operations console_ops = {
.chars_in_buffer = line_chars_in_buffer, .chars_in_buffer = line_chars_in_buffer,
.flush_buffer = line_flush_buffer, .flush_buffer = line_flush_buffer,
.flush_chars = line_flush_chars, .flush_chars = line_flush_chars,
.set_termios = line_set_termios,
.throttle = line_throttle, .throttle = line_throttle,
.unthrottle = line_unthrottle, .unthrottle = line_unthrottle,
.hangup = line_hangup, .hangup = line_hangup,

View File

@ -1197,11 +1197,6 @@ static unsigned int capinc_tty_chars_in_buffer(struct tty_struct *tty)
return mp->outbytes; return mp->outbytes;
} }
static void capinc_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
{
pr_debug("capinc_tty_set_termios\n");
}
static void capinc_tty_throttle(struct tty_struct *tty) static void capinc_tty_throttle(struct tty_struct *tty)
{ {
struct capiminor *mp = tty->driver_data; struct capiminor *mp = tty->driver_data;
@ -1267,7 +1262,6 @@ static const struct tty_operations capinc_ops = {
.flush_chars = capinc_tty_flush_chars, .flush_chars = capinc_tty_flush_chars,
.write_room = capinc_tty_write_room, .write_room = capinc_tty_write_room,
.chars_in_buffer = capinc_tty_chars_in_buffer, .chars_in_buffer = capinc_tty_chars_in_buffer,
.set_termios = capinc_tty_set_termios,
.throttle = capinc_tty_throttle, .throttle = capinc_tty_throttle,
.unthrottle = capinc_tty_unthrottle, .unthrottle = capinc_tty_unthrottle,
.stop = capinc_tty_stop, .stop = capinc_tty_stop,