diff options
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r-- | include/linux/tty.h | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h index 7f9d7df9b131..40b18d7ad929 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -268,7 +268,6 @@ struct tty_struct { | |||
268 | struct mutex ldisc_mutex; | 268 | struct mutex ldisc_mutex; |
269 | struct tty_ldisc *ldisc; | 269 | struct tty_ldisc *ldisc; |
270 | 270 | ||
271 | struct mutex legacy_mutex; | ||
272 | struct mutex termios_mutex; | 271 | struct mutex termios_mutex; |
273 | spinlock_t ctrl_lock; | 272 | spinlock_t ctrl_lock; |
274 | /* Termios values are protected by the termios mutex */ | 273 | /* Termios values are protected by the termios mutex */ |
@@ -611,12 +610,8 @@ extern long vt_compat_ioctl(struct tty_struct *tty, | |||
611 | 610 | ||
612 | /* tty_mutex.c */ | 611 | /* tty_mutex.c */ |
613 | /* functions for preparation of BKL removal */ | 612 | /* functions for preparation of BKL removal */ |
614 | extern void __lockfunc tty_lock(struct tty_struct *tty); | 613 | extern void __lockfunc tty_lock(void) __acquires(tty_lock); |
615 | extern void __lockfunc tty_unlock(struct tty_struct *tty); | 614 | extern void __lockfunc tty_unlock(void) __releases(tty_lock); |
616 | extern void __lockfunc tty_lock_pair(struct tty_struct *tty, | ||
617 | struct tty_struct *tty2); | ||
618 | extern void __lockfunc tty_unlock_pair(struct tty_struct *tty, | ||
619 | struct tty_struct *tty2); | ||
620 | 615 | ||
621 | /* | 616 | /* |
622 | * this shall be called only from where BTM is held (like close) | 617 | * this shall be called only from where BTM is held (like close) |
@@ -631,9 +626,9 @@ extern void __lockfunc tty_unlock_pair(struct tty_struct *tty, | |||
631 | static inline void tty_wait_until_sent_from_close(struct tty_struct *tty, | 626 | static inline void tty_wait_until_sent_from_close(struct tty_struct *tty, |
632 | long timeout) | 627 | long timeout) |
633 | { | 628 | { |
634 | tty_unlock(tty); /* tty->ops->close holds the BTM, drop it while waiting */ | 629 | tty_unlock(); /* tty->ops->close holds the BTM, drop it while waiting */ |
635 | tty_wait_until_sent(tty, timeout); | 630 | tty_wait_until_sent(tty, timeout); |
636 | tty_lock(tty); | 631 | tty_lock(); |
637 | } | 632 | } |
638 | 633 | ||
639 | /* | 634 | /* |
@@ -648,16 +643,16 @@ static inline void tty_wait_until_sent_from_close(struct tty_struct *tty, | |||
648 | * | 643 | * |
649 | * Do not use in new code. | 644 | * Do not use in new code. |
650 | */ | 645 | */ |
651 | #define wait_event_interruptible_tty(tty, wq, condition) \ | 646 | #define wait_event_interruptible_tty(wq, condition) \ |
652 | ({ \ | 647 | ({ \ |
653 | int __ret = 0; \ | 648 | int __ret = 0; \ |
654 | if (!(condition)) { \ | 649 | if (!(condition)) { \ |
655 | __wait_event_interruptible_tty(tty, wq, condition, __ret); \ | 650 | __wait_event_interruptible_tty(wq, condition, __ret); \ |
656 | } \ | 651 | } \ |
657 | __ret; \ | 652 | __ret; \ |
658 | }) | 653 | }) |
659 | 654 | ||
660 | #define __wait_event_interruptible_tty(tty, wq, condition, ret) \ | 655 | #define __wait_event_interruptible_tty(wq, condition, ret) \ |
661 | do { \ | 656 | do { \ |
662 | DEFINE_WAIT(__wait); \ | 657 | DEFINE_WAIT(__wait); \ |
663 | \ | 658 | \ |
@@ -666,9 +661,9 @@ do { \ | |||
666 | if (condition) \ | 661 | if (condition) \ |
667 | break; \ | 662 | break; \ |
668 | if (!signal_pending(current)) { \ | 663 | if (!signal_pending(current)) { \ |
669 | tty_unlock(tty); \ | 664 | tty_unlock(); \ |
670 | schedule(); \ | 665 | schedule(); \ |
671 | tty_lock(tty); \ | 666 | tty_lock(); \ |
672 | continue; \ | 667 | continue; \ |
673 | } \ | 668 | } \ |
674 | ret = -ERESTARTSYS; \ | 669 | ret = -ERESTARTSYS; \ |