aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tty.h
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-09-19 16:13:20 -0400
committerLive-CD User <linux@linux.site>2009-09-19 16:13:20 -0400
commit7ca0ff9ab3218ec443a7a9ad247e4650373ed41e (patch)
tree73cb5a8f36d9999e0c85957cc27e7be2f140a610 /include/linux/tty.h
parent24d481ecae1614cf02e638c8dce9b6e8bf230603 (diff)
tty: Add a full port_close function
Now we are extracting out methods for shutdown and the like we can add a proper tty_port_close method that knows all the innards of the tty closing process and hides the lot from the caller. At some point in the future this will be paired with a similar open() helper and the drivers can stick to hardware management. Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r--include/linux/tty.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h
index a916a318004e..ecb3d1ba3017 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -187,7 +187,12 @@ struct tty_port;
187struct tty_port_operations { 187struct tty_port_operations {
188 /* Return 1 if the carrier is raised */ 188 /* Return 1 if the carrier is raised */
189 int (*carrier_raised)(struct tty_port *port); 189 int (*carrier_raised)(struct tty_port *port);
190 /* Control the DTR line */
190 void (*dtr_rts)(struct tty_port *port, int raise); 191 void (*dtr_rts)(struct tty_port *port, int raise);
192 /* Called when the last close completes or a hangup finishes
193 IFF the port was initialized. Do not use to free resources */
194 void (*shutdown)(struct tty_port *port);
195 void (*drop)(struct tty_port *port);
191}; 196};
192 197
193struct tty_port { 198struct tty_port {
@@ -459,7 +464,8 @@ extern int tty_port_block_til_ready(struct tty_port *port,
459extern int tty_port_close_start(struct tty_port *port, 464extern int tty_port_close_start(struct tty_port *port,
460 struct tty_struct *tty, struct file *filp); 465 struct tty_struct *tty, struct file *filp);
461extern void tty_port_close_end(struct tty_port *port, struct tty_struct *tty); 466extern void tty_port_close_end(struct tty_port *port, struct tty_struct *tty);
462 467extern void tty_port_close(struct tty_port *port,
468 struct tty_struct *tty, struct file *filp);
463extern int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc); 469extern int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc);
464extern int tty_unregister_ldisc(int disc); 470extern int tty_unregister_ldisc(int disc);
465extern int tty_set_ldisc(struct tty_struct *tty, int ldisc); 471extern int tty_set_ldisc(struct tty_struct *tty, int ldisc);