summaryrefslogtreecommitdiff
path: root/drivers/tty/n_hdlc.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2020-02-19 09:41:04 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-21 10:24:33 +0100
commit4040c828607975fbdc4c557a85bde115c524e857 (patch)
treef4739aa36c09f127a7c032a9c9ef1e19a3f5a1d4 /drivers/tty/n_hdlc.c
parenta1274b26ac2780ea21ef69507421b43d0f5a8a4a (diff)
n_hdlc: remove unused backup_tty
It's only set to NULL and never properly used. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20200219084118.26491-10-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/n_hdlc.c')
-rw-r--r--drivers/tty/n_hdlc.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/tty/n_hdlc.c b/drivers/tty/n_hdlc.c
index d0e538ba51ea..ae6b9a45ae81 100644
--- a/drivers/tty/n_hdlc.c
+++ b/drivers/tty/n_hdlc.c
@@ -125,7 +125,6 @@ struct n_hdlc_buf_list {
* struct n_hdlc - per device instance data structure
* @magic - magic value for structure
* @tty - ptr to TTY structure
- * @backup_tty - TTY to use if tty gets closed
* @tbusy - reentrancy flag for tx wakeup code
* @woke_up - FIXME: describe this field
* @tx_buf_list - list of pending transmit frame buffers
@@ -136,7 +135,6 @@ struct n_hdlc_buf_list {
struct n_hdlc {
int magic;
struct tty_struct *tty;
- struct tty_struct *backup_tty;
int tbusy;
int woke_up;
struct n_hdlc_buf_list tx_buf_list;
@@ -267,15 +265,9 @@ static void n_hdlc_tty_close(struct tty_struct *tty)
clear_bit(TTY_NO_WRITE_SPLIT,&tty->flags);
#endif
tty->disc_data = NULL;
- if (tty == n_hdlc->backup_tty)
- n_hdlc->backup_tty = NULL;
if (tty != n_hdlc->tty)
return;
- if (n_hdlc->backup_tty) {
- n_hdlc->tty = n_hdlc->backup_tty;
- } else {
- n_hdlc_release (n_hdlc);
- }
+ n_hdlc_release (n_hdlc);
} /* end of n_hdlc_tty_close() */
/**