diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-26 09:11:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-26 09:11:09 -0400 |
commit | efb8d21b2c6db3497655cc6a033ae8a9883e4063 (patch) | |
tree | a14a0dbb9fec3a6db5e542ba7ed4a49681706420 /include/linux/tty.h | |
parent | 3cb603284b3d256ae9ae9e65887cee8416bfef15 (diff) | |
parent | d208a3bf77f902283894f546b6b5383202cf7882 (diff) |
Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
* 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (79 commits)
TTY: serial_core: Fix crash if DCD drop during suspend
tty/serial: atmel_serial: bootconsole removed from auto-enumerates
Revert "TTY: call tty_driver_lookup_tty unconditionally"
tty/serial: atmel_serial: add device tree support
tty/serial: atmel_serial: auto-enumerate ports
tty/serial: atmel_serial: whitespace and braces modifications
tty/serial: atmel_serial: change platform_data variable name
tty/serial: RS485 bindings for device tree
TTY: call tty_driver_lookup_tty unconditionally
TTY: pty, release tty in all ptmx_open fail paths
TTY: make tty_add_file non-failing
TTY: drop driver reference in tty_open fail path
8250_pci: Fix kernel panic when pch_uart is disabled
h8300: drivers/serial/Kconfig was moved
parport_pc: release IO region properly if unsupported ITE887x card is found
tty: Support compat_ioctl get/set termios_locked
hvc_console: display printk messages on console.
TTY: snyclinkmp: forever loop in tx_load_dma_buffer()
tty/n_gsm: avoid fifo overflow in gsm_dlci_data_output
tty/n_gsm: fix a bug in gsm_dlci_data_output (adaption = 2 case)
...
Fix up Conflicts in:
- drivers/tty/serial/8250_pci.c
Trivial conflict with removed duplicate device ID
- drivers/tty/serial/atmel_serial.c
Annoying silly conflict between "specify the port num via
platform_data" and other changes to atmel_console_init
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r-- | include/linux/tty.h | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h index 5f2ede82b3d6..5dbb3cb05a82 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -473,7 +473,9 @@ extern void proc_clear_tty(struct task_struct *p); | |||
473 | extern struct tty_struct *get_current_tty(void); | 473 | extern struct tty_struct *get_current_tty(void); |
474 | extern void tty_default_fops(struct file_operations *fops); | 474 | extern void tty_default_fops(struct file_operations *fops); |
475 | extern struct tty_struct *alloc_tty_struct(void); | 475 | extern struct tty_struct *alloc_tty_struct(void); |
476 | extern int tty_add_file(struct tty_struct *tty, struct file *file); | 476 | extern int tty_alloc_file(struct file *file); |
477 | extern void tty_add_file(struct tty_struct *tty, struct file *file); | ||
478 | extern void tty_free_file(struct file *file); | ||
477 | extern void free_tty_struct(struct tty_struct *tty); | 479 | extern void free_tty_struct(struct tty_struct *tty); |
478 | extern void initialize_tty_struct(struct tty_struct *tty, | 480 | extern void initialize_tty_struct(struct tty_struct *tty, |
479 | struct tty_driver *driver, int idx); | 481 | struct tty_driver *driver, int idx); |
@@ -581,6 +583,8 @@ extern int __init tty_init(void); | |||
581 | /* tty_ioctl.c */ | 583 | /* tty_ioctl.c */ |
582 | extern int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file, | 584 | extern int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file, |
583 | unsigned int cmd, unsigned long arg); | 585 | unsigned int cmd, unsigned long arg); |
586 | extern long n_tty_compat_ioctl_helper(struct tty_struct *tty, struct file *file, | ||
587 | unsigned int cmd, unsigned long arg); | ||
584 | 588 | ||
585 | /* serial.c */ | 589 | /* serial.c */ |
586 | 590 | ||
@@ -602,8 +606,24 @@ extern long vt_compat_ioctl(struct tty_struct *tty, | |||
602 | /* functions for preparation of BKL removal */ | 606 | /* functions for preparation of BKL removal */ |
603 | extern void __lockfunc tty_lock(void) __acquires(tty_lock); | 607 | extern void __lockfunc tty_lock(void) __acquires(tty_lock); |
604 | extern void __lockfunc tty_unlock(void) __releases(tty_lock); | 608 | extern void __lockfunc tty_unlock(void) __releases(tty_lock); |
605 | extern struct task_struct *__big_tty_mutex_owner; | 609 | |
606 | #define tty_locked() (current == __big_tty_mutex_owner) | 610 | /* |
611 | * this shall be called only from where BTM is held (like close) | ||
612 | * | ||
613 | * We need this to ensure nobody waits for us to finish while we are waiting. | ||
614 | * Without this we were encountering system stalls. | ||
615 | * | ||
616 | * This should be indeed removed with BTM removal later. | ||
617 | * | ||
618 | * Locking: BTM required. Nobody is allowed to hold port->mutex. | ||
619 | */ | ||
620 | static inline void tty_wait_until_sent_from_close(struct tty_struct *tty, | ||
621 | long timeout) | ||
622 | { | ||
623 | tty_unlock(); /* tty->ops->close holds the BTM, drop it while waiting */ | ||
624 | tty_wait_until_sent(tty, timeout); | ||
625 | tty_lock(); | ||
626 | } | ||
607 | 627 | ||
608 | /* | 628 | /* |
609 | * wait_event_interruptible_tty -- wait for a condition with the tty lock held | 629 | * wait_event_interruptible_tty -- wait for a condition with the tty lock held |