tty: Remove dead termiox code
[ Upstream commit e0efb3168d34dc8c8c72718672b8902e40efff8f ]
set_termiox() and the TCGETX handler bail out with -EINVAL immediately
if ->termiox is NULL, but there are no code paths that can set
->termiox to a non-NULL pointer; and no such code paths seem to have
existed since the termiox mechanism was introduced back in
commit 1d65b4a088
("tty: Add termiox") in v2.6.28.
Similarly, no driver actually implements .set_termiox; and it looks like
no driver ever has.
Delete this dead code; but leave the definition of struct termiox in the
UAPI headers intact.
Signed-off-by: Jann Horn <jannh@google.com>
Link: https://lore.kernel.org/r/20201203020331.2394754-1-jannh@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
aa7f103da3
commit
eef2158b0c
@@ -224,14 +224,6 @@
|
||||
* line). See tty_do_resize() if you need to wrap the standard method
|
||||
* in your own logic - the usual case.
|
||||
*
|
||||
* void (*set_termiox)(struct tty_struct *tty, struct termiox *new);
|
||||
*
|
||||
* Called when the device receives a termiox based ioctl. Passes down
|
||||
* the requested data from user space. This method will not be invoked
|
||||
* unless the tty also has a valid tty->termiox pointer.
|
||||
*
|
||||
* Optional: Called under the termios lock
|
||||
*
|
||||
* int (*get_icount)(struct tty_struct *tty, struct serial_icounter *icount);
|
||||
*
|
||||
* Called when the device receives a TIOCGICOUNT ioctl. Passed a kernel
|
||||
@@ -285,7 +277,6 @@ struct tty_operations {
|
||||
int (*tiocmset)(struct tty_struct *tty,
|
||||
unsigned int set, unsigned int clear);
|
||||
int (*resize)(struct tty_struct *tty, struct winsize *ws);
|
||||
int (*set_termiox)(struct tty_struct *tty, struct termiox *tnew);
|
||||
int (*get_icount)(struct tty_struct *tty,
|
||||
struct serial_icounter_struct *icount);
|
||||
int (*get_serial)(struct tty_struct *tty, struct serial_struct *p);
|
||||
|
Reference in New Issue
Block a user