This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / net / ppp_async.c
index b64f284..ae5255a 100644 (file)
@@ -237,6 +237,18 @@ ppp_asynctty_close(struct tty_struct *tty)
        kfree(ap);
 }
 
+/*
+ * Called on tty hangup in process context.
+ *
+ * Wait for I/O to driver to complete and unregister PPP channel.
+ * This is already done by the close routine, so just call that.
+ */
+static int ppp_asynctty_hangup(struct tty_struct *tty)
+{
+       ppp_asynctty_close(tty);
+       return 0;
+}
+
 /*
  * Read does nothing - no data is ever available this way.
  * Pppd reads and writes packets via /dev/ppp instead.
@@ -380,6 +392,7 @@ static struct tty_ldisc ppp_ldisc = {
        .name   = "ppp",
        .open   = ppp_asynctty_open,
        .close  = ppp_asynctty_close,
+       .hangup = ppp_asynctty_hangup,
        .read   = ppp_asynctty_read,
        .write  = ppp_asynctty_write,
        .ioctl  = ppp_asynctty_ioctl,