All ::flush_chars(), ::hangup(), and ::wait_until_sent() from struct tty_operations are optional. There is no need to provide them with empty bodies. tty_operations::put_char() needs not be provided if it is the same as tty_operations::write(tty, &ch, 1). So drop all of them. Signed-off-by: Jiri Slaby (SUSE) <jirislaby@xxxxxxxxxx> Cc: Chris Zankel <chris@xxxxxxxxxx> Cc: Max Filippov <jcmvbkbc@xxxxxxxxx> --- arch/xtensa/platforms/iss/console.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c index 10b79d3c74e0..b40b73809dd8 100644 --- a/arch/xtensa/platforms/iss/console.c +++ b/arch/xtensa/platforms/iss/console.c @@ -82,32 +82,12 @@ static void rs_poll(struct timer_list *unused) mod_timer(&serial_timer, jiffies + SERIAL_TIMER_VALUE); } - -static int rs_put_char(struct tty_struct *tty, unsigned char ch) -{ - return rs_write(tty, &ch, 1); -} - -static void rs_flush_chars(struct tty_struct *tty) -{ -} - static unsigned int rs_write_room(struct tty_struct *tty) { /* Let's say iss can always accept 2K characters.. */ return 2 * 1024; } -static void rs_hangup(struct tty_struct *tty) -{ - /* Stub, once again.. */ -} - -static void rs_wait_until_sent(struct tty_struct *tty, int timeout) -{ - /* Stub, once again.. */ -} - static int rs_proc_show(struct seq_file *m, void *v) { seq_printf(m, "serinfo:1.0 driver:0.1\n"); @@ -118,11 +98,7 @@ static const struct tty_operations serial_ops = { .open = rs_open, .close = rs_close, .write = rs_write, - .put_char = rs_put_char, - .flush_chars = rs_flush_chars, .write_room = rs_write_room, - .hangup = rs_hangup, - .wait_until_sent = rs_wait_until_sent, .proc_show = rs_proc_show, }; -- 2.41.0