diff options
Diffstat (limited to 'include/linux/tty.h')
| -rw-r--r-- | include/linux/tty.h | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h index 64f864651d86..97d660ed70c1 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -180,7 +180,6 @@ struct tty_port_operations { | |||
| 180 | IFF the port was initialized. Do not use to free resources. Called | 180 | IFF the port was initialized. Do not use to free resources. Called |
| 181 | under the port mutex to serialize against activate/shutdowns */ | 181 | under the port mutex to serialize against activate/shutdowns */ |
| 182 | void (*shutdown)(struct tty_port *port); | 182 | void (*shutdown)(struct tty_port *port); |
| 183 | void (*drop)(struct tty_port *port); | ||
| 184 | /* Called under the port mutex from tty_port_open, serialized using | 183 | /* Called under the port mutex from tty_port_open, serialized using |
| 185 | the port mutex */ | 184 | the port mutex */ |
| 186 | /* FIXME: long term getting the tty argument *out* of this would be | 185 | /* FIXME: long term getting the tty argument *out* of this would be |
| @@ -672,31 +671,17 @@ static inline void tty_wait_until_sent_from_close(struct tty_struct *tty, | |||
| 672 | #define wait_event_interruptible_tty(tty, wq, condition) \ | 671 | #define wait_event_interruptible_tty(tty, wq, condition) \ |
| 673 | ({ \ | 672 | ({ \ |
| 674 | int __ret = 0; \ | 673 | int __ret = 0; \ |
| 675 | if (!(condition)) { \ | 674 | if (!(condition)) \ |
| 676 | __wait_event_interruptible_tty(tty, wq, condition, __ret); \ | 675 | __ret = __wait_event_interruptible_tty(tty, wq, \ |
| 677 | } \ | 676 | condition); \ |
| 678 | __ret; \ | 677 | __ret; \ |
| 679 | }) | 678 | }) |
| 680 | 679 | ||
| 681 | #define __wait_event_interruptible_tty(tty, wq, condition, ret) \ | 680 | #define __wait_event_interruptible_tty(tty, wq, condition) \ |
| 682 | do { \ | 681 | ___wait_event(wq, condition, TASK_INTERRUPTIBLE, 0, 0, \ |
| 683 | DEFINE_WAIT(__wait); \ | 682 | tty_unlock(tty); \ |
| 684 | \ | ||
| 685 | for (;;) { \ | ||
| 686 | prepare_to_wait(&wq, &__wait, TASK_INTERRUPTIBLE); \ | ||
| 687 | if (condition) \ | ||
| 688 | break; \ | ||
| 689 | if (!signal_pending(current)) { \ | ||
| 690 | tty_unlock(tty); \ | ||
| 691 | schedule(); \ | 683 | schedule(); \ |
| 692 | tty_lock(tty); \ | 684 | tty_lock(tty)) |
| 693 | continue; \ | ||
| 694 | } \ | ||
| 695 | ret = -ERESTARTSYS; \ | ||
| 696 | break; \ | ||
| 697 | } \ | ||
| 698 | finish_wait(&wq, &__wait); \ | ||
| 699 | } while (0) | ||
| 700 | 685 | ||
| 701 | #ifdef CONFIG_PROC_FS | 686 | #ifdef CONFIG_PROC_FS |
| 702 | extern void proc_tty_register_driver(struct tty_driver *); | 687 | extern void proc_tty_register_driver(struct tty_driver *); |
