diff options
| author | Alan Cox <alan@linux.intel.com> | 2009-09-19 16:13:20 -0400 |
|---|---|---|
| committer | Live-CD User <linux@linux.site> | 2009-09-19 16:13:20 -0400 |
| commit | 7ca0ff9ab3218ec443a7a9ad247e4650373ed41e (patch) | |
| tree | 73cb5a8f36d9999e0c85957cc27e7be2f140a610 /include/linux | |
| parent | 24d481ecae1614cf02e638c8dce9b6e8bf230603 (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')
| -rw-r--r-- | include/linux/tty.h | 8 |
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; | |||
| 187 | struct tty_port_operations { | 187 | struct 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 | ||
| 193 | struct tty_port { | 198 | struct tty_port { |
| @@ -459,7 +464,8 @@ extern int tty_port_block_til_ready(struct tty_port *port, | |||
| 459 | extern int tty_port_close_start(struct tty_port *port, | 464 | extern 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); |
| 461 | extern void tty_port_close_end(struct tty_port *port, struct tty_struct *tty); | 466 | extern void tty_port_close_end(struct tty_port *port, struct tty_struct *tty); |
| 462 | 467 | extern void tty_port_close(struct tty_port *port, | |
| 468 | struct tty_struct *tty, struct file *filp); | ||
| 463 | extern int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc); | 469 | extern int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc); |
| 464 | extern int tty_unregister_ldisc(int disc); | 470 | extern int tty_unregister_ldisc(int disc); |
| 465 | extern int tty_set_ldisc(struct tty_struct *tty, int ldisc); | 471 | extern int tty_set_ldisc(struct tty_struct *tty, int ldisc); |
