Skip to content

Commit

Permalink
um: line, remove put_char
Browse files Browse the repository at this point in the history
um's put_char only calls write. And the tty layer/disciplines do the
same if put_char is NULL.

So we can safely remove this put_char wrapper.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Link: https://lore.kernel.org/r/20200615074856.18949-1-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Jun 24, 2020
1 parent 4877846 commit 96564ac
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
5 changes: 0 additions & 5 deletions arch/um/drivers/line.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,6 @@ void line_flush_chars(struct tty_struct *tty)
line_flush_buffer(tty);
}

int line_put_char(struct tty_struct *tty, unsigned char ch)
{
return line_write(tty, &ch, sizeof(ch));
}

int line_write(struct tty_struct *tty, const unsigned char *buf, int len)
{
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 int line_put_char(struct tty_struct *tty, unsigned char ch);
extern void line_set_termios(struct tty_struct *tty, struct ktermios * old);
extern int line_chars_in_buffer(struct tty_struct *tty);
extern void line_flush_buffer(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 @@ -95,7 +95,6 @@ static const struct tty_operations ssl_ops = {
.open = line_open,
.close = line_close,
.write = line_write,
.put_char = line_put_char,
.write_room = line_write_room,
.chars_in_buffer = line_chars_in_buffer,
.flush_buffer = line_flush_buffer,
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 @@ -102,7 +102,6 @@ static const struct tty_operations console_ops = {
.install = con_install,
.close = line_close,
.write = line_write,
.put_char = line_put_char,
.write_room = line_write_room,
.chars_in_buffer = line_chars_in_buffer,
.flush_buffer = line_flush_buffer,
Expand Down

0 comments on commit 96564ac

Please sign in to comment.