TTY: move tty buffers to tty_port
[deliverable/linux.git] / drivers / tty / tty_port.c
index d7bdd8d0c23f0faa832aee87447af772958ceb13..416b42f7c346680067ea6eb8d4679421cf5596c8 100644 (file)
@@ -21,6 +21,7 @@
 void tty_port_init(struct tty_port *port)
 {
        memset(port, 0, sizeof(*port));
+       tty_buffer_init(port);
        init_waitqueue_head(&port->open_wait);
        init_waitqueue_head(&port->close_wait);
        init_waitqueue_head(&port->delta_msr_wait);
@@ -126,6 +127,7 @@ static void tty_port_destructor(struct kref *kref)
        struct tty_port *port = container_of(kref, struct tty_port, kref);
        if (port->xmit_buf)
                free_page((unsigned long)port->xmit_buf);
+       tty_buffer_free_all(port);
        if (port->ops->destruct)
                port->ops->destruct(port);
        else
This page took 0.027759 seconds and 5 git commands to generate.