aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-09-19 16:13:32 -0400
committerLive-CD User <linux@linux.site>2009-09-19 16:13:32 -0400
commitb58d13a0216d4e0753668214f23e1d2c24c30f8c (patch)
treee641971a9f1464b7f5a045d4df0e58874b6bf035 /include
parentbdc04e3174e18f475289fa8f4144f66686326b7e (diff)
serial: move port users helper
This little helper is now tty_port specific and useful generally so move it Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/tty.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 0daa8a72b176..a0e03309a379 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -467,6 +467,11 @@ extern int tty_port_close_start(struct tty_port *port,
467extern void tty_port_close_end(struct tty_port *port, struct tty_struct *tty); 467extern void tty_port_close_end(struct tty_port *port, struct tty_struct *tty);
468extern void tty_port_close(struct tty_port *port, 468extern void tty_port_close(struct tty_port *port,
469 struct tty_struct *tty, struct file *filp); 469 struct tty_struct *tty, struct file *filp);
470extern inline int tty_port_users(struct tty_port *port)
471{
472 return port->count + port->blocked_open;
473}
474
470extern int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc); 475extern int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc);
471extern int tty_unregister_ldisc(int disc); 476extern int tty_unregister_ldisc(int disc);
472extern int tty_set_ldisc(struct tty_struct *tty, int ldisc); 477extern int tty_set_ldisc(struct tty_struct *tty, int ldisc);