Skip to content

Commit

Permalink
tty: remove empty tty_operations::set_termios
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Jeff Dike <[email protected]>
Cc: Richard Weinberger <[email protected]>
Cc: Karsten Keil <[email protected]>
Acked-By: Anton Ivanov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Jiri Slaby authored and gregkh committed May 13, 2021
1 parent 4fb266e commit 4da872b
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 14 deletions.
5 changes: 0 additions & 5 deletions arch/um/drivers/line.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,6 @@ int line_write(struct tty_struct *tty, const unsigned char *buf, int len)
return ret;
}

void line_set_termios(struct tty_struct *tty, struct ktermios * old)
{
/* nothing */
}

void line_throttle(struct tty_struct *tty)
{
struct line *line = tty->driver_data;
Expand Down
1 change: 0 additions & 1 deletion arch/um/drivers/line.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ extern int line_setup(char **conf, unsigned nlines, char **def,
char *init, char *name);
extern int line_write(struct tty_struct *tty, const unsigned char *buf,
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 void line_flush_buffer(struct tty_struct *tty);
extern void line_flush_chars(struct tty_struct *tty);
Expand Down
1 change: 0 additions & 1 deletion arch/um/drivers/ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ static const struct tty_operations ssl_ops = {
.chars_in_buffer = line_chars_in_buffer,
.flush_buffer = line_flush_buffer,
.flush_chars = line_flush_chars,
.set_termios = line_set_termios,
.throttle = line_throttle,
.unthrottle = line_unthrottle,
.install = ssl_install,
Expand Down
1 change: 0 additions & 1 deletion arch/um/drivers/stdio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ static const struct tty_operations console_ops = {
.chars_in_buffer = line_chars_in_buffer,
.flush_buffer = line_flush_buffer,
.flush_chars = line_flush_chars,
.set_termios = line_set_termios,
.throttle = line_throttle,
.unthrottle = line_unthrottle,
.hangup = line_hangup,
Expand Down
6 changes: 0 additions & 6 deletions drivers/isdn/capi/capi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1197,11 +1197,6 @@ static unsigned int capinc_tty_chars_in_buffer(struct tty_struct *tty)
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)
{
struct capiminor *mp = tty->driver_data;
Expand Down Expand Up @@ -1267,7 +1262,6 @@ static const struct tty_operations capinc_ops = {
.flush_chars = capinc_tty_flush_chars,
.write_room = capinc_tty_write_room,
.chars_in_buffer = capinc_tty_chars_in_buffer,
.set_termios = capinc_tty_set_termios,
.throttle = capinc_tty_throttle,
.unthrottle = capinc_tty_unthrottle,
.stop = capinc_tty_stop,
Expand Down

0 comments on commit 4da872b

Please sign in to comment.