Commit 695586ca20c56cf8cfa87160383307a288d32496

Authored by Jiri Slaby
Committed by Greg Kroah-Hartman
1 parent 4c2ef53d3b

TTY: provide drivers with tty_port_install

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>

Showing 2 changed files with 10 additions and 0 deletions Side-by-side Diff

drivers/tty/tty_port.c
... ... @@ -413,6 +413,14 @@
413 413 }
414 414 EXPORT_SYMBOL(tty_port_close);
415 415  
  416 +int tty_port_install(struct tty_port *port, struct tty_driver *driver,
  417 + struct tty_struct *tty)
  418 +{
  419 + tty->port = port;
  420 + return tty_standard_install(driver, tty);
  421 +}
  422 +EXPORT_SYMBOL_GPL(tty_port_install);
  423 +
416 424 int tty_port_open(struct tty_port *port, struct tty_struct *tty,
417 425 struct file *filp)
418 426 {
... ... @@ -521,6 +521,8 @@
521 521 extern void tty_port_close_end(struct tty_port *port, struct tty_struct *tty);
522 522 extern void tty_port_close(struct tty_port *port,
523 523 struct tty_struct *tty, struct file *filp);
  524 +extern int tty_port_install(struct tty_port *port, struct tty_driver *driver,
  525 + struct tty_struct *tty);
524 526 extern int tty_port_open(struct tty_port *port,
525 527 struct tty_struct *tty, struct file *filp);
526 528 static inline int tty_port_users(struct tty_port *port)