aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tty.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r--include/linux/tty.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 67d64e6efe7a..d6f05292e456 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -13,7 +13,6 @@
13#include <linux/tty_driver.h> 13#include <linux/tty_driver.h>
14#include <linux/tty_ldisc.h> 14#include <linux/tty_ldisc.h>
15#include <linux/mutex.h> 15#include <linux/mutex.h>
16#include <linux/smp_lock.h>
17 16
18#include <asm/system.h> 17#include <asm/system.h>
19 18
@@ -50,6 +49,9 @@
50#define N_V253 19 /* Codec control over voice modem */ 49#define N_V253 19 /* Codec control over voice modem */
51#define N_CAIF 20 /* CAIF protocol for talking to modems */ 50#define N_CAIF 20 /* CAIF protocol for talking to modems */
52#define N_GSM0710 21 /* GSM 0710 Mux */ 51#define N_GSM0710 21 /* GSM 0710 Mux */
52#define N_TI_WL 22 /* for TI's WL BT, FM, GPS combo chips */
53#define N_TRACESINK 23 /* Trace data routing for MIPI P1149.7 */
54#define N_TRACEROUTER 24 /* Trace data routing for MIPI P1149.7 */
53 55
54/* 56/*
55 * This character is the same as _POSIX_VDISABLE: it cannot be used as 57 * This character is the same as _POSIX_VDISABLE: it cannot be used as
@@ -82,7 +84,7 @@ struct tty_buffer {
82 84
83 85
84struct tty_bufhead { 86struct tty_bufhead {
85 struct delayed_work work; 87 struct work_struct work;
86 spinlock_t lock; 88 spinlock_t lock;
87 struct tty_buffer *head; /* Queue head */ 89 struct tty_buffer *head; /* Queue head */
88 struct tty_buffer *tail; /* Active buffer */ 90 struct tty_buffer *tail; /* Active buffer */
@@ -256,6 +258,7 @@ struct tty_operations;
256struct tty_struct { 258struct tty_struct {
257 int magic; 259 int magic;
258 struct kref kref; 260 struct kref kref;
261 struct device *dev;
259 struct tty_driver *driver; 262 struct tty_driver *driver;
260 const struct tty_operations *ops; 263 const struct tty_operations *ops;
261 int index; 264 int index;
@@ -365,6 +368,7 @@ struct tty_file_private {
365#define TTY_HUPPED 18 /* Post driver->hangup() */ 368#define TTY_HUPPED 18 /* Post driver->hangup() */
366#define TTY_FLUSHING 19 /* Flushing to ldisc in progress */ 369#define TTY_FLUSHING 19 /* Flushing to ldisc in progress */
367#define TTY_FLUSHPENDING 20 /* Queued buffer flush pending */ 370#define TTY_FLUSHPENDING 20 /* Queued buffer flush pending */
371#define TTY_HUPPING 21 /* ->hangup() in progress */
368 372
369#define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) 373#define TTY_WRITE_FLUSH(tty) tty_write_flush((tty))
370 374
@@ -446,6 +450,7 @@ extern void tty_encode_baud_rate(struct tty_struct *tty,
446 speed_t ibaud, speed_t obaud); 450 speed_t ibaud, speed_t obaud);
447extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old); 451extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old);
448extern int tty_termios_hw_change(struct ktermios *a, struct ktermios *b); 452extern int tty_termios_hw_change(struct ktermios *a, struct ktermios *b);
453extern int tty_set_termios(struct tty_struct *tty, struct ktermios *kt);
449 454
450extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *); 455extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *);
451extern void tty_ldisc_deref(struct tty_ldisc *); 456extern void tty_ldisc_deref(struct tty_ldisc *);
@@ -465,10 +470,11 @@ extern void proc_clear_tty(struct task_struct *p);
465extern struct tty_struct *get_current_tty(void); 470extern struct tty_struct *get_current_tty(void);
466extern void tty_default_fops(struct file_operations *fops); 471extern void tty_default_fops(struct file_operations *fops);
467extern struct tty_struct *alloc_tty_struct(void); 472extern struct tty_struct *alloc_tty_struct(void);
468extern void tty_add_file(struct tty_struct *tty, struct file *file); 473extern int tty_add_file(struct tty_struct *tty, struct file *file);
469extern void free_tty_struct(struct tty_struct *tty); 474extern void free_tty_struct(struct tty_struct *tty);
470extern void initialize_tty_struct(struct tty_struct *tty, 475extern void initialize_tty_struct(struct tty_struct *tty,
471 struct tty_driver *driver, int idx); 476 struct tty_driver *driver, int idx);
477extern void deinitialize_tty_struct(struct tty_struct *tty);
472extern struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx, 478extern struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx,
473 int first_ok); 479 int first_ok);
474extern int tty_release(struct inode *inode, struct file *filp); 480extern int tty_release(struct inode *inode, struct file *filp);
@@ -522,6 +528,7 @@ extern int tty_set_ldisc(struct tty_struct *tty, int ldisc);
522extern int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty); 528extern int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty);
523extern void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty); 529extern void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty);
524extern void tty_ldisc_init(struct tty_struct *tty); 530extern void tty_ldisc_init(struct tty_struct *tty);
531extern void tty_ldisc_deinit(struct tty_struct *tty);
525extern void tty_ldisc_begin(void); 532extern void tty_ldisc_begin(void);
526/* This last one is just for the tty layer internals and shouldn't be used elsewhere */ 533/* This last one is just for the tty layer internals and shouldn't be used elsewhere */
527extern void tty_ldisc_enable(struct tty_struct *tty); 534extern void tty_ldisc_enable(struct tty_struct *tty);
@@ -539,8 +546,8 @@ extern void tty_audit_exit(void);
539extern void tty_audit_fork(struct signal_struct *sig); 546extern void tty_audit_fork(struct signal_struct *sig);
540extern void tty_audit_tiocsti(struct tty_struct *tty, char ch); 547extern void tty_audit_tiocsti(struct tty_struct *tty, char ch);
541extern void tty_audit_push(struct tty_struct *tty); 548extern void tty_audit_push(struct tty_struct *tty);
542extern void tty_audit_push_task(struct task_struct *tsk, 549extern int tty_audit_push_task(struct task_struct *tsk,
543 uid_t loginuid, u32 sessionid); 550 uid_t loginuid, u32 sessionid);
544#else 551#else
545static inline void tty_audit_add_data(struct tty_struct *tty, 552static inline void tty_audit_add_data(struct tty_struct *tty,
546 unsigned char *data, size_t size) 553 unsigned char *data, size_t size)
@@ -558,9 +565,10 @@ static inline void tty_audit_fork(struct signal_struct *sig)
558static inline void tty_audit_push(struct tty_struct *tty) 565static inline void tty_audit_push(struct tty_struct *tty)
559{ 566{
560} 567}
561static inline void tty_audit_push_task(struct task_struct *tsk, 568static inline int tty_audit_push_task(struct task_struct *tsk,
562 uid_t loginuid, u32 sessionid) 569 uid_t loginuid, u32 sessionid)
563{ 570{
571 return 0;
564} 572}
565#endif 573#endif
566 574
@@ -581,10 +589,10 @@ extern int pcxe_open(struct tty_struct *tty, struct file *filp);
581 589
582/* vt.c */ 590/* vt.c */
583 591
584extern int vt_ioctl(struct tty_struct *tty, struct file *file, 592extern int vt_ioctl(struct tty_struct *tty,
585 unsigned int cmd, unsigned long arg); 593 unsigned int cmd, unsigned long arg);
586 594
587extern long vt_compat_ioctl(struct tty_struct *tty, struct file * file, 595extern long vt_compat_ioctl(struct tty_struct *tty,
588 unsigned int cmd, unsigned long arg); 596 unsigned int cmd, unsigned long arg);
589 597
590/* tty_mutex.c */ 598/* tty_mutex.c */