|
@@ -600,6 +600,25 @@ err:
|
|
return retval;
|
|
return retval;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * tty_ldisc_kill - teardown ldisc
|
|
|
|
+ * @tty: tty being released
|
|
|
|
+ *
|
|
|
|
+ * Perform final close of the ldisc and reset tty->ldisc
|
|
|
|
+ */
|
|
|
|
+static void tty_ldisc_kill(struct tty_struct *tty)
|
|
|
|
+{
|
|
|
|
+ if (!tty->ldisc)
|
|
|
|
+ return;
|
|
|
|
+ /*
|
|
|
|
+ * Now kill off the ldisc
|
|
|
|
+ */
|
|
|
|
+ tty_ldisc_close(tty, tty->ldisc);
|
|
|
|
+ tty_ldisc_put(tty->ldisc);
|
|
|
|
+ /* Force an oops if we mess this up */
|
|
|
|
+ tty->ldisc = NULL;
|
|
|
|
+}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* tty_reset_termios - reset terminal state
|
|
* tty_reset_termios - reset terminal state
|
|
* @tty: tty to reset
|
|
* @tty: tty to reset
|
|
@@ -747,19 +766,6 @@ int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-static void tty_ldisc_kill(struct tty_struct *tty)
|
|
|
|
-{
|
|
|
|
- if (!tty->ldisc)
|
|
|
|
- return;
|
|
|
|
- /*
|
|
|
|
- * Now kill off the ldisc
|
|
|
|
- */
|
|
|
|
- tty_ldisc_close(tty, tty->ldisc);
|
|
|
|
- tty_ldisc_put(tty->ldisc);
|
|
|
|
- /* Force an oops if we mess this up */
|
|
|
|
- tty->ldisc = NULL;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* tty_ldisc_release - release line discipline
|
|
* tty_ldisc_release - release line discipline
|
|
* @tty: tty being shut down (or one end of pty pair)
|
|
* @tty: tty being shut down (or one end of pty pair)
|