]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
TTY: provide drivers with tty_port_install
authorJiri Slaby <jslaby@suse.cz>
Mon, 4 Jun 2012 11:35:32 +0000 (13:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Jun 2012 00:30:53 +0000 (17:30 -0700)
This will be used in tty_ops->install to set tty->port (and to call
tty_standard_install).

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_port.c
include/linux/tty.h

index bf6e238146ae40acd4ac8ea2f517574870366590..1ac8abf4708dd1ee94b1209a5672c49e8cc8d8ef 100644 (file)
@@ -413,6 +413,14 @@ void tty_port_close(struct tty_port *port, struct tty_struct *tty,
 }
 EXPORT_SYMBOL(tty_port_close);
 
+int tty_port_install(struct tty_port *port, struct tty_driver *driver,
+               struct tty_struct *tty)
+{
+       tty->port = port;
+       return tty_standard_install(driver, tty);
+}
+EXPORT_SYMBOL_GPL(tty_port_install);
+
 int tty_port_open(struct tty_port *port, struct tty_struct *tty,
                                                        struct file *filp)
 {
index 9f47ab540f65e997b79b0a16c52332c564354234..45ef71df0e72881d64c00d52938f589e0cbe379f 100644 (file)
@@ -521,6 +521,8 @@ extern int tty_port_close_start(struct tty_port *port,
 extern void tty_port_close_end(struct tty_port *port, struct tty_struct *tty);
 extern void tty_port_close(struct tty_port *port,
                                struct tty_struct *tty, struct file *filp);
+extern int tty_port_install(struct tty_port *port, struct tty_driver *driver,
+                               struct tty_struct *tty);
 extern int tty_port_open(struct tty_port *port,
                                struct tty_struct *tty, struct file *filp);
 static inline int tty_port_users(struct tty_port *port)