Commit 4040c828 authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman

n_hdlc: remove unused backup_tty

It's only set to NULL and never properly used.
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20200219084118.26491-10-jslaby@suse.czSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a1274b26
...@@ -125,7 +125,6 @@ struct n_hdlc_buf_list { ...@@ -125,7 +125,6 @@ struct n_hdlc_buf_list {
* struct n_hdlc - per device instance data structure * struct n_hdlc - per device instance data structure
* @magic - magic value for structure * @magic - magic value for structure
* @tty - ptr to TTY structure * @tty - ptr to TTY structure
* @backup_tty - TTY to use if tty gets closed
* @tbusy - reentrancy flag for tx wakeup code * @tbusy - reentrancy flag for tx wakeup code
* @woke_up - FIXME: describe this field * @woke_up - FIXME: describe this field
* @tx_buf_list - list of pending transmit frame buffers * @tx_buf_list - list of pending transmit frame buffers
...@@ -136,7 +135,6 @@ struct n_hdlc_buf_list { ...@@ -136,7 +135,6 @@ struct n_hdlc_buf_list {
struct n_hdlc { struct n_hdlc {
int magic; int magic;
struct tty_struct *tty; struct tty_struct *tty;
struct tty_struct *backup_tty;
int tbusy; int tbusy;
int woke_up; int woke_up;
struct n_hdlc_buf_list tx_buf_list; struct n_hdlc_buf_list tx_buf_list;
...@@ -267,15 +265,9 @@ static void n_hdlc_tty_close(struct tty_struct *tty) ...@@ -267,15 +265,9 @@ static void n_hdlc_tty_close(struct tty_struct *tty)
clear_bit(TTY_NO_WRITE_SPLIT,&tty->flags); clear_bit(TTY_NO_WRITE_SPLIT,&tty->flags);
#endif #endif
tty->disc_data = NULL; tty->disc_data = NULL;
if (tty == n_hdlc->backup_tty)
n_hdlc->backup_tty = NULL;
if (tty != n_hdlc->tty) if (tty != n_hdlc->tty)
return; return;
if (n_hdlc->backup_tty) { n_hdlc_release (n_hdlc);
n_hdlc->tty = n_hdlc->backup_tty;
} else {
n_hdlc_release (n_hdlc);
}
} /* end of n_hdlc_tty_close() */ } /* end of n_hdlc_tty_close() */
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment