aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tty.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r--include/linux/tty.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h
index bbbeaef99626..bc7bae78e22f 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -180,8 +180,16 @@ struct signal_struct;
180 * until a hangup so don't use the wrong path. 180 * until a hangup so don't use the wrong path.
181 */ 181 */
182 182
183struct tty_port;
184
185struct tty_port_operations {
186 /* Return 1 if the carrier is raised */
187 int (*carrier_raised)(struct tty_port *port);
188};
189
183struct tty_port { 190struct tty_port {
184 struct tty_struct *tty; /* Back pointer */ 191 struct tty_struct *tty; /* Back pointer */
192 const struct tty_port_operations *ops; /* Port operations */
185 spinlock_t lock; /* Lock protecting tty field */ 193 spinlock_t lock; /* Lock protecting tty field */
186 int blocked_open; /* Waiting to open */ 194 int blocked_open; /* Waiting to open */
187 int count; /* Usage count */ 195 int count; /* Usage count */
@@ -427,6 +435,7 @@ extern int tty_port_alloc_xmit_buf(struct tty_port *port);
427extern void tty_port_free_xmit_buf(struct tty_port *port); 435extern void tty_port_free_xmit_buf(struct tty_port *port);
428extern struct tty_struct *tty_port_tty_get(struct tty_port *port); 436extern struct tty_struct *tty_port_tty_get(struct tty_port *port);
429extern void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty); 437extern void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty);
438extern int tty_port_carrier_raised(struct tty_port *port);
430 439
431extern int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc); 440extern int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc);
432extern int tty_unregister_ldisc(int disc); 441extern int tty_unregister_ldisc(int disc);