/** * tty_port_destroy -- destroy inited port * @port: tty port to be doestroyed * * When a port was initialized using tty_port_init, one has to destroy the * port by this function. Either indirectly by using tty_port refcounting * (tty_port_put) or directly if refcounting is not used. */ void tty_port_destroy(struct tty_port *port) { tty_buffer_cancel_work(port); tty_buffer_free_all(port); }
/** * tty_port_destroy -- destroy inited port * @port: tty port to be doestroyed * * When a port was initialized using tty_port_init, one has to destroy the * port by this function. Either indirectly by using tty_port refcounting * (tty_port_put) or directly if refcounting is not used. */ void tty_port_destroy(struct tty_port *port) { cancel_work_sync(&port->buf.work); tty_buffer_free_all(port); }