diff options
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r-- | include/linux/tty.h | 26 |
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 | ||
84 | struct tty_bufhead { | 86 | struct 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; | |||
256 | struct tty_struct { | 258 | struct 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); |
447 | extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old); | 451 | extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old); |
448 | extern int tty_termios_hw_change(struct ktermios *a, struct ktermios *b); | 452 | extern int tty_termios_hw_change(struct ktermios *a, struct ktermios *b); |
453 | extern int tty_set_termios(struct tty_struct *tty, struct ktermios *kt); | ||
449 | 454 | ||
450 | extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *); | 455 | extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *); |
451 | extern void tty_ldisc_deref(struct tty_ldisc *); | 456 | extern void tty_ldisc_deref(struct tty_ldisc *); |
@@ -465,10 +470,11 @@ extern void proc_clear_tty(struct task_struct *p); | |||
465 | extern struct tty_struct *get_current_tty(void); | 470 | extern struct tty_struct *get_current_tty(void); |
466 | extern void tty_default_fops(struct file_operations *fops); | 471 | extern void tty_default_fops(struct file_operations *fops); |
467 | extern struct tty_struct *alloc_tty_struct(void); | 472 | extern struct tty_struct *alloc_tty_struct(void); |
468 | extern void tty_add_file(struct tty_struct *tty, struct file *file); | 473 | extern int tty_add_file(struct tty_struct *tty, struct file *file); |
469 | extern void free_tty_struct(struct tty_struct *tty); | 474 | extern void free_tty_struct(struct tty_struct *tty); |
470 | extern void initialize_tty_struct(struct tty_struct *tty, | 475 | extern void initialize_tty_struct(struct tty_struct *tty, |
471 | struct tty_driver *driver, int idx); | 476 | struct tty_driver *driver, int idx); |
477 | extern void deinitialize_tty_struct(struct tty_struct *tty); | ||
472 | extern struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx, | 478 | extern struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx, |
473 | int first_ok); | 479 | int first_ok); |
474 | extern int tty_release(struct inode *inode, struct file *filp); | 480 | extern int tty_release(struct inode *inode, struct file *filp); |
@@ -522,6 +528,7 @@ extern int tty_set_ldisc(struct tty_struct *tty, int ldisc); | |||
522 | extern int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty); | 528 | extern int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty); |
523 | extern void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty); | 529 | extern void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty); |
524 | extern void tty_ldisc_init(struct tty_struct *tty); | 530 | extern void tty_ldisc_init(struct tty_struct *tty); |
531 | extern void tty_ldisc_deinit(struct tty_struct *tty); | ||
525 | extern void tty_ldisc_begin(void); | 532 | extern 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 */ |
527 | extern void tty_ldisc_enable(struct tty_struct *tty); | 534 | extern void tty_ldisc_enable(struct tty_struct *tty); |
@@ -539,8 +546,8 @@ extern void tty_audit_exit(void); | |||
539 | extern void tty_audit_fork(struct signal_struct *sig); | 546 | extern void tty_audit_fork(struct signal_struct *sig); |
540 | extern void tty_audit_tiocsti(struct tty_struct *tty, char ch); | 547 | extern void tty_audit_tiocsti(struct tty_struct *tty, char ch); |
541 | extern void tty_audit_push(struct tty_struct *tty); | 548 | extern void tty_audit_push(struct tty_struct *tty); |
542 | extern void tty_audit_push_task(struct task_struct *tsk, | 549 | extern 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 |
545 | static inline void tty_audit_add_data(struct tty_struct *tty, | 552 | static 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) | |||
558 | static inline void tty_audit_push(struct tty_struct *tty) | 565 | static inline void tty_audit_push(struct tty_struct *tty) |
559 | { | 566 | { |
560 | } | 567 | } |
561 | static inline void tty_audit_push_task(struct task_struct *tsk, | 568 | static 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 | ||
584 | extern int vt_ioctl(struct tty_struct *tty, struct file *file, | 592 | extern int vt_ioctl(struct tty_struct *tty, |
585 | unsigned int cmd, unsigned long arg); | 593 | unsigned int cmd, unsigned long arg); |
586 | 594 | ||
587 | extern long vt_compat_ioctl(struct tty_struct *tty, struct file * file, | 595 | extern 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 */ |