diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/console.h | 5 | ||||
-rw-r--r-- | include/linux/kgdb.h | 1 | ||||
-rw-r--r-- | include/linux/of_serial.h | 17 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 15 | ||||
-rw-r--r-- | include/linux/platform_data/s3c-hsotg.h | 2 | ||||
-rw-r--r-- | include/linux/platform_data/serial-sccnxp.h (renamed from include/linux/platform_data/sccnxp.h) | 6 | ||||
-rw-r--r-- | include/linux/pps_kernel.h | 17 | ||||
-rw-r--r-- | include/linux/proc_fs.h | 5 | ||||
-rw-r--r-- | include/linux/serial_8250.h | 4 | ||||
-rw-r--r-- | include/linux/serial_core.h | 26 | ||||
-rw-r--r-- | include/linux/sunserialcore.h | 4 | ||||
-rw-r--r-- | include/linux/tty.h | 50 | ||||
-rw-r--r-- | include/linux/tty_driver.h | 1 | ||||
-rw-r--r-- | include/linux/tty_flip.h | 28 | ||||
-rw-r--r-- | include/linux/tty_ldisc.h | 11 |
15 files changed, 129 insertions, 63 deletions
diff --git a/include/linux/console.h b/include/linux/console.h index dedb082fe50f..3b709da1786e 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
@@ -157,7 +157,12 @@ extern int is_console_locked(void); | |||
157 | extern int braille_register_console(struct console *, int index, | 157 | extern int braille_register_console(struct console *, int index, |
158 | char *console_options, char *braille_options); | 158 | char *console_options, char *braille_options); |
159 | extern int braille_unregister_console(struct console *); | 159 | extern int braille_unregister_console(struct console *); |
160 | #ifdef CONFIG_TTY | ||
160 | extern void console_sysfs_notify(void); | 161 | extern void console_sysfs_notify(void); |
162 | #else | ||
163 | static inline void console_sysfs_notify(void) | ||
164 | { } | ||
165 | #endif | ||
161 | extern bool console_suspend_enabled; | 166 | extern bool console_suspend_enabled; |
162 | 167 | ||
163 | /* Suspend and resume console messages over PM events */ | 168 | /* Suspend and resume console messages over PM events */ |
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h index 4dff0c6ed58f..c6e091bf39a5 100644 --- a/include/linux/kgdb.h +++ b/include/linux/kgdb.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #ifndef _KGDB_H_ | 13 | #ifndef _KGDB_H_ |
14 | #define _KGDB_H_ | 14 | #define _KGDB_H_ |
15 | 15 | ||
16 | #include <linux/serial_8250.h> | ||
17 | #include <linux/linkage.h> | 16 | #include <linux/linkage.h> |
18 | #include <linux/init.h> | 17 | #include <linux/init.h> |
19 | #include <linux/atomic.h> | 18 | #include <linux/atomic.h> |
diff --git a/include/linux/of_serial.h b/include/linux/of_serial.h deleted file mode 100644 index 4a73ed80b4c0..000000000000 --- a/include/linux/of_serial.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | #ifndef __LINUX_OF_SERIAL_H | ||
2 | #define __LINUX_OF_SERIAL_H | ||
3 | |||
4 | /* | ||
5 | * FIXME remove this file when tegra finishes conversion to open firmware, | ||
6 | * expectation is that all quirks will then be self-contained in | ||
7 | * drivers/tty/serial/of_serial.c. | ||
8 | */ | ||
9 | #ifdef CONFIG_ARCH_TEGRA | ||
10 | extern void tegra_serial_handle_break(struct uart_port *port); | ||
11 | #else | ||
12 | static inline void tegra_serial_handle_break(struct uart_port *port) | ||
13 | { | ||
14 | } | ||
15 | #endif | ||
16 | |||
17 | #endif /* __LINUX_OF_SERIAL */ | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 6938ccfa42d5..31717bd287fd 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1870,8 +1870,23 @@ | |||
1870 | #define PCI_VENDOR_ID_QUATECH 0x135C | 1870 | #define PCI_VENDOR_ID_QUATECH 0x135C |
1871 | #define PCI_DEVICE_ID_QUATECH_QSC100 0x0010 | 1871 | #define PCI_DEVICE_ID_QUATECH_QSC100 0x0010 |
1872 | #define PCI_DEVICE_ID_QUATECH_DSC100 0x0020 | 1872 | #define PCI_DEVICE_ID_QUATECH_DSC100 0x0020 |
1873 | #define PCI_DEVICE_ID_QUATECH_DSC200 0x0030 | ||
1874 | #define PCI_DEVICE_ID_QUATECH_QSC200 0x0040 | ||
1873 | #define PCI_DEVICE_ID_QUATECH_ESC100D 0x0050 | 1875 | #define PCI_DEVICE_ID_QUATECH_ESC100D 0x0050 |
1874 | #define PCI_DEVICE_ID_QUATECH_ESC100M 0x0060 | 1876 | #define PCI_DEVICE_ID_QUATECH_ESC100M 0x0060 |
1877 | #define PCI_DEVICE_ID_QUATECH_QSCP100 0x0120 | ||
1878 | #define PCI_DEVICE_ID_QUATECH_DSCP100 0x0130 | ||
1879 | #define PCI_DEVICE_ID_QUATECH_QSCP200 0x0140 | ||
1880 | #define PCI_DEVICE_ID_QUATECH_DSCP200 0x0150 | ||
1881 | #define PCI_DEVICE_ID_QUATECH_QSCLP100 0x0170 | ||
1882 | #define PCI_DEVICE_ID_QUATECH_DSCLP100 0x0180 | ||
1883 | #define PCI_DEVICE_ID_QUATECH_DSC100E 0x0181 | ||
1884 | #define PCI_DEVICE_ID_QUATECH_SSCLP100 0x0190 | ||
1885 | #define PCI_DEVICE_ID_QUATECH_QSCLP200 0x01A0 | ||
1886 | #define PCI_DEVICE_ID_QUATECH_DSCLP200 0x01B0 | ||
1887 | #define PCI_DEVICE_ID_QUATECH_DSC200E 0x01B1 | ||
1888 | #define PCI_DEVICE_ID_QUATECH_SSCLP200 0x01C0 | ||
1889 | #define PCI_DEVICE_ID_QUATECH_ESCLP100 0x01E0 | ||
1875 | #define PCI_DEVICE_ID_QUATECH_SPPXP_100 0x0278 | 1890 | #define PCI_DEVICE_ID_QUATECH_SPPXP_100 0x0278 |
1876 | 1891 | ||
1877 | #define PCI_VENDOR_ID_SEALEVEL 0x135e | 1892 | #define PCI_VENDOR_ID_SEALEVEL 0x135e |
diff --git a/include/linux/platform_data/s3c-hsotg.h b/include/linux/platform_data/s3c-hsotg.h index 8b79e0967f9c..3f1cbf95ec3b 100644 --- a/include/linux/platform_data/s3c-hsotg.h +++ b/include/linux/platform_data/s3c-hsotg.h | |||
@@ -15,6 +15,8 @@ | |||
15 | #ifndef __LINUX_USB_S3C_HSOTG_H | 15 | #ifndef __LINUX_USB_S3C_HSOTG_H |
16 | #define __LINUX_USB_S3C_HSOTG_H | 16 | #define __LINUX_USB_S3C_HSOTG_H |
17 | 17 | ||
18 | struct platform_device; | ||
19 | |||
18 | enum s3c_hsotg_dmamode { | 20 | enum s3c_hsotg_dmamode { |
19 | S3C_HSOTG_DMA_NONE, /* do not use DMA at-all */ | 21 | S3C_HSOTG_DMA_NONE, /* do not use DMA at-all */ |
20 | S3C_HSOTG_DMA_ONLY, /* always use DMA */ | 22 | S3C_HSOTG_DMA_ONLY, /* always use DMA */ |
diff --git a/include/linux/platform_data/sccnxp.h b/include/linux/platform_data/serial-sccnxp.h index 7311ccd3217f..215574d1e81d 100644 --- a/include/linux/platform_data/sccnxp.h +++ b/include/linux/platform_data/serial-sccnxp.h | |||
@@ -11,8 +11,8 @@ | |||
11 | * (at your option) any later version. | 11 | * (at your option) any later version. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #ifndef __SCCNXP_H | 14 | #ifndef _PLATFORM_DATA_SERIAL_SCCNXP_H_ |
15 | #define __SCCNXP_H | 15 | #define _PLATFORM_DATA_SERIAL_SCCNXP_H_ |
16 | 16 | ||
17 | #define SCCNXP_MAX_UARTS 2 | 17 | #define SCCNXP_MAX_UARTS 2 |
18 | 18 | ||
@@ -84,6 +84,8 @@ struct sccnxp_pdata { | |||
84 | const u8 reg_shift; | 84 | const u8 reg_shift; |
85 | /* Modem control lines configuration */ | 85 | /* Modem control lines configuration */ |
86 | const u32 mctrl_cfg[SCCNXP_MAX_UARTS]; | 86 | const u32 mctrl_cfg[SCCNXP_MAX_UARTS]; |
87 | /* Timer value for polling mode (usecs) */ | ||
88 | const unsigned int poll_time_us; | ||
87 | /* Called during startup */ | 89 | /* Called during startup */ |
88 | void (*init)(void); | 90 | void (*init)(void); |
89 | /* Called before finish */ | 91 | /* Called before finish */ |
diff --git a/include/linux/pps_kernel.h b/include/linux/pps_kernel.h index 0cc45ae1afd5..7db3eb93a079 100644 --- a/include/linux/pps_kernel.h +++ b/include/linux/pps_kernel.h | |||
@@ -43,7 +43,7 @@ struct pps_source_info { | |||
43 | int event, void *data); /* PPS echo function */ | 43 | int event, void *data); /* PPS echo function */ |
44 | 44 | ||
45 | struct module *owner; | 45 | struct module *owner; |
46 | struct device *dev; | 46 | struct device *dev; /* Parent device for device_create */ |
47 | }; | 47 | }; |
48 | 48 | ||
49 | struct pps_event_time { | 49 | struct pps_event_time { |
@@ -69,6 +69,7 @@ struct pps_device { | |||
69 | wait_queue_head_t queue; /* PPS event queue */ | 69 | wait_queue_head_t queue; /* PPS event queue */ |
70 | 70 | ||
71 | unsigned int id; /* PPS source unique ID */ | 71 | unsigned int id; /* PPS source unique ID */ |
72 | void const *lookup_cookie; /* pps_lookup_dev only */ | ||
72 | struct cdev cdev; | 73 | struct cdev cdev; |
73 | struct device *dev; | 74 | struct device *dev; |
74 | struct fasync_struct *async_queue; /* fasync method */ | 75 | struct fasync_struct *async_queue; /* fasync method */ |
@@ -82,16 +83,26 @@ struct pps_device { | |||
82 | extern struct device_attribute pps_attrs[]; | 83 | extern struct device_attribute pps_attrs[]; |
83 | 84 | ||
84 | /* | 85 | /* |
86 | * Internal functions. | ||
87 | * | ||
88 | * These are not actually part of the exported API, but this is a | ||
89 | * convenient header file to put them in. | ||
90 | */ | ||
91 | |||
92 | extern int pps_register_cdev(struct pps_device *pps); | ||
93 | extern void pps_unregister_cdev(struct pps_device *pps); | ||
94 | |||
95 | /* | ||
85 | * Exported functions | 96 | * Exported functions |
86 | */ | 97 | */ |
87 | 98 | ||
88 | extern struct pps_device *pps_register_source( | 99 | extern struct pps_device *pps_register_source( |
89 | struct pps_source_info *info, int default_params); | 100 | struct pps_source_info *info, int default_params); |
90 | extern void pps_unregister_source(struct pps_device *pps); | 101 | extern void pps_unregister_source(struct pps_device *pps); |
91 | extern int pps_register_cdev(struct pps_device *pps); | ||
92 | extern void pps_unregister_cdev(struct pps_device *pps); | ||
93 | extern void pps_event(struct pps_device *pps, | 102 | extern void pps_event(struct pps_device *pps, |
94 | struct pps_event_time *ts, int event, void *data); | 103 | struct pps_event_time *ts, int event, void *data); |
104 | /* Look up a pps device by magic cookie */ | ||
105 | struct pps_device *pps_lookup_dev(void const *cookie); | ||
95 | 106 | ||
96 | static inline void timespec_to_pps_ktime(struct pps_ktime *kt, | 107 | static inline void timespec_to_pps_ktime(struct pps_ktime *kt, |
97 | struct timespec ts) | 108 | struct timespec ts) |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index d0a1f2ca1c3f..8307f2f94d86 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -127,7 +127,12 @@ extern void pid_ns_release_proc(struct pid_namespace *ns); | |||
127 | * proc_tty.c | 127 | * proc_tty.c |
128 | */ | 128 | */ |
129 | struct tty_driver; | 129 | struct tty_driver; |
130 | #ifdef CONFIG_TTY | ||
130 | extern void proc_tty_init(void); | 131 | extern void proc_tty_init(void); |
132 | #else | ||
133 | static inline void proc_tty_init(void) | ||
134 | { } | ||
135 | #endif | ||
131 | extern void proc_tty_register_driver(struct tty_driver *driver); | 136 | extern void proc_tty_register_driver(struct tty_driver *driver); |
132 | extern void proc_tty_unregister_driver(struct tty_driver *driver); | 137 | extern void proc_tty_unregister_driver(struct tty_driver *driver); |
133 | 138 | ||
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index c490d20b3fb8..af47a8af6024 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h | |||
@@ -59,6 +59,8 @@ enum { | |||
59 | PLAT8250_DEV_SM501, | 59 | PLAT8250_DEV_SM501, |
60 | }; | 60 | }; |
61 | 61 | ||
62 | struct uart_8250_dma; | ||
63 | |||
62 | /* | 64 | /* |
63 | * This should be used by drivers which want to register | 65 | * This should be used by drivers which want to register |
64 | * their own 8250 ports without registering their own | 66 | * their own 8250 ports without registering their own |
@@ -91,6 +93,8 @@ struct uart_8250_port { | |||
91 | #define MSR_SAVE_FLAGS UART_MSR_ANY_DELTA | 93 | #define MSR_SAVE_FLAGS UART_MSR_ANY_DELTA |
92 | unsigned char msr_saved_flags; | 94 | unsigned char msr_saved_flags; |
93 | 95 | ||
96 | struct uart_8250_dma *dma; | ||
97 | |||
94 | /* 8250 specific callbacks */ | 98 | /* 8250 specific callbacks */ |
95 | int (*dl_read)(struct uart_8250_port *); | 99 | int (*dl_read)(struct uart_8250_port *); |
96 | void (*dl_write)(struct uart_8250_port *, int); | 100 | void (*dl_write)(struct uart_8250_port *, int); |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index c6690a2a27fb..87d4bbc773fc 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/tty.h> | 29 | #include <linux/tty.h> |
30 | #include <linux/mutex.h> | 30 | #include <linux/mutex.h> |
31 | #include <linux/sysrq.h> | 31 | #include <linux/sysrq.h> |
32 | #include <linux/pps_kernel.h> | ||
33 | #include <uapi/linux/serial_core.h> | 32 | #include <uapi/linux/serial_core.h> |
34 | 33 | ||
35 | struct uart_port; | 34 | struct uart_port; |
@@ -37,8 +36,8 @@ struct serial_struct; | |||
37 | struct device; | 36 | struct device; |
38 | 37 | ||
39 | /* | 38 | /* |
40 | * This structure describes all the operations that can be | 39 | * This structure describes all the operations that can be done on the |
41 | * done on the physical hardware. | 40 | * physical hardware. See Documentation/serial/driver for details. |
42 | */ | 41 | */ |
43 | struct uart_ops { | 42 | struct uart_ops { |
44 | unsigned int (*tx_empty)(struct uart_port *); | 43 | unsigned int (*tx_empty)(struct uart_port *); |
@@ -65,7 +64,7 @@ struct uart_ops { | |||
65 | /* | 64 | /* |
66 | * Return a string describing the type of the port | 65 | * Return a string describing the type of the port |
67 | */ | 66 | */ |
68 | const char *(*type)(struct uart_port *); | 67 | const char *(*type)(struct uart_port *); |
69 | 68 | ||
70 | /* | 69 | /* |
71 | * Release IO and memory resources used by the port. | 70 | * Release IO and memory resources used by the port. |
@@ -83,7 +82,7 @@ struct uart_ops { | |||
83 | int (*ioctl)(struct uart_port *, unsigned int, unsigned long); | 82 | int (*ioctl)(struct uart_port *, unsigned int, unsigned long); |
84 | #ifdef CONFIG_CONSOLE_POLL | 83 | #ifdef CONFIG_CONSOLE_POLL |
85 | int (*poll_init)(struct uart_port *); | 84 | int (*poll_init)(struct uart_port *); |
86 | void (*poll_put_char)(struct uart_port *, unsigned char); | 85 | void (*poll_put_char)(struct uart_port *, unsigned char); |
87 | int (*poll_get_char)(struct uart_port *); | 86 | int (*poll_get_char)(struct uart_port *); |
88 | #endif | 87 | #endif |
89 | }; | 88 | }; |
@@ -134,9 +133,8 @@ struct uart_port { | |||
134 | #define UPIO_HUB6 (1) | 133 | #define UPIO_HUB6 (1) |
135 | #define UPIO_MEM (2) | 134 | #define UPIO_MEM (2) |
136 | #define UPIO_MEM32 (3) | 135 | #define UPIO_MEM32 (3) |
137 | #define UPIO_AU (4) /* Au1x00 type IO */ | 136 | #define UPIO_AU (4) /* Au1x00 and RT288x type IO */ |
138 | #define UPIO_TSI (5) /* Tsi108/109 type IO */ | 137 | #define UPIO_TSI (5) /* Tsi108/109 type IO */ |
139 | #define UPIO_RM9000 (6) /* RM9000 type IO */ | ||
140 | 138 | ||
141 | unsigned int read_status_mask; /* driver specific */ | 139 | unsigned int read_status_mask; /* driver specific */ |
142 | unsigned int ignore_status_mask; /* driver specific */ | 140 | unsigned int ignore_status_mask; /* driver specific */ |
@@ -208,13 +206,25 @@ static inline void serial_port_out(struct uart_port *up, int offset, int value) | |||
208 | up->serial_out(up, offset, value); | 206 | up->serial_out(up, offset, value); |
209 | } | 207 | } |
210 | 208 | ||
209 | /** | ||
210 | * enum uart_pm_state - power states for UARTs | ||
211 | * @UART_PM_STATE_ON: UART is powered, up and operational | ||
212 | * @UART_PM_STATE_OFF: UART is powered off | ||
213 | * @UART_PM_STATE_UNDEFINED: sentinel | ||
214 | */ | ||
215 | enum uart_pm_state { | ||
216 | UART_PM_STATE_ON = 0, | ||
217 | UART_PM_STATE_OFF = 3, /* number taken from ACPI */ | ||
218 | UART_PM_STATE_UNDEFINED, | ||
219 | }; | ||
220 | |||
211 | /* | 221 | /* |
212 | * This is the state information which is persistent across opens. | 222 | * This is the state information which is persistent across opens. |
213 | */ | 223 | */ |
214 | struct uart_state { | 224 | struct uart_state { |
215 | struct tty_port port; | 225 | struct tty_port port; |
216 | 226 | ||
217 | int pm_state; | 227 | enum uart_pm_state pm_state; |
218 | struct circ_buf xmit; | 228 | struct circ_buf xmit; |
219 | 229 | ||
220 | struct uart_port *uart_port; | 230 | struct uart_port *uart_port; |
diff --git a/include/linux/sunserialcore.h b/include/linux/sunserialcore.h index 68e7430bb0fe..dbe4d7fca1b8 100644 --- a/include/linux/sunserialcore.h +++ b/include/linux/sunserialcore.h | |||
@@ -13,6 +13,10 @@ | |||
13 | #ifndef _SERIAL_SUN_H | 13 | #ifndef _SERIAL_SUN_H |
14 | #define _SERIAL_SUN_H | 14 | #define _SERIAL_SUN_H |
15 | 15 | ||
16 | #include <linux/device.h> | ||
17 | #include <linux/serial_core.h> | ||
18 | #include <linux/console.h> | ||
19 | |||
16 | /* Serial keyboard defines for L1-A processing... */ | 20 | /* Serial keyboard defines for L1-A processing... */ |
17 | #define SUNKBD_RESET 0xff | 21 | #define SUNKBD_RESET 0xff |
18 | #define SUNKBD_L1 0x01 | 22 | #define SUNKBD_L1 0x01 |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 8db1b569c37a..c75d886b0307 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -202,7 +202,8 @@ struct tty_port { | |||
202 | unsigned long iflags; /* TTYP_ internal flags */ | 202 | unsigned long iflags; /* TTYP_ internal flags */ |
203 | #define TTYP_FLUSHING 1 /* Flushing to ldisc in progress */ | 203 | #define TTYP_FLUSHING 1 /* Flushing to ldisc in progress */ |
204 | #define TTYP_FLUSHPENDING 2 /* Queued buffer flush pending */ | 204 | #define TTYP_FLUSHPENDING 2 /* Queued buffer flush pending */ |
205 | unsigned char console:1; /* port is a console */ | 205 | unsigned char console:1, /* port is a console */ |
206 | low_latency:1; /* direct buffer flush */ | ||
206 | struct mutex mutex; /* Locking */ | 207 | struct mutex mutex; /* Locking */ |
207 | struct mutex buf_mutex; /* Buffer alloc lock */ | 208 | struct mutex buf_mutex; /* Buffer alloc lock */ |
208 | unsigned char *xmit_buf; /* Optional buffer */ | 209 | unsigned char *xmit_buf; /* Optional buffer */ |
@@ -254,7 +255,7 @@ struct tty_struct { | |||
254 | int count; | 255 | int count; |
255 | struct winsize winsize; /* termios mutex */ | 256 | struct winsize winsize; /* termios mutex */ |
256 | unsigned char stopped:1, hw_stopped:1, flow_stopped:1, packet:1; | 257 | unsigned char stopped:1, hw_stopped:1, flow_stopped:1, packet:1; |
257 | unsigned char low_latency:1, warned:1; | 258 | unsigned char warned:1; |
258 | unsigned char ctrl_status; /* ctrl_lock */ | 259 | unsigned char ctrl_status; /* ctrl_lock */ |
259 | unsigned int receive_room; /* Bytes free for queue */ | 260 | unsigned int receive_room; /* Bytes free for queue */ |
260 | 261 | ||
@@ -317,11 +318,43 @@ struct tty_file_private { | |||
317 | 318 | ||
318 | #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) | 319 | #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) |
319 | 320 | ||
321 | #ifdef CONFIG_TTY | ||
322 | extern void console_init(void); | ||
323 | extern void tty_kref_put(struct tty_struct *tty); | ||
324 | extern struct pid *tty_get_pgrp(struct tty_struct *tty); | ||
325 | extern void tty_vhangup_self(void); | ||
326 | extern void disassociate_ctty(int priv); | ||
327 | extern dev_t tty_devnum(struct tty_struct *tty); | ||
328 | extern void proc_clear_tty(struct task_struct *p); | ||
329 | extern struct tty_struct *get_current_tty(void); | ||
330 | /* tty_io.c */ | ||
331 | extern int __init tty_init(void); | ||
332 | #else | ||
333 | static inline void console_init(void) | ||
334 | { } | ||
335 | static inline void tty_kref_put(struct tty_struct *tty) | ||
336 | { } | ||
337 | static inline struct pid *tty_get_pgrp(struct tty_struct *tty) | ||
338 | { return NULL; } | ||
339 | static inline void tty_vhangup_self(void) | ||
340 | { } | ||
341 | static inline void disassociate_ctty(int priv) | ||
342 | { } | ||
343 | static inline dev_t tty_devnum(struct tty_struct *tty) | ||
344 | { return 0; } | ||
345 | static inline void proc_clear_tty(struct task_struct *p) | ||
346 | { } | ||
347 | static inline struct tty_struct *get_current_tty(void) | ||
348 | { return NULL; } | ||
349 | /* tty_io.c */ | ||
350 | static inline int __init tty_init(void) | ||
351 | { return 0; } | ||
352 | #endif | ||
353 | |||
320 | extern void tty_write_flush(struct tty_struct *); | 354 | extern void tty_write_flush(struct tty_struct *); |
321 | 355 | ||
322 | extern struct ktermios tty_std_termios; | 356 | extern struct ktermios tty_std_termios; |
323 | 357 | ||
324 | extern void console_init(void); | ||
325 | extern int vcs_init(void); | 358 | extern int vcs_init(void); |
326 | 359 | ||
327 | extern struct class *tty_class; | 360 | extern struct class *tty_class; |
@@ -341,7 +374,6 @@ static inline struct tty_struct *tty_kref_get(struct tty_struct *tty) | |||
341 | kref_get(&tty->kref); | 374 | kref_get(&tty->kref); |
342 | return tty; | 375 | return tty; |
343 | } | 376 | } |
344 | extern void tty_kref_put(struct tty_struct *tty); | ||
345 | 377 | ||
346 | extern int tty_paranoia_check(struct tty_struct *tty, struct inode *inode, | 378 | extern int tty_paranoia_check(struct tty_struct *tty, struct inode *inode, |
347 | const char *routine); | 379 | const char *routine); |
@@ -373,20 +405,16 @@ extern void tty_driver_remove_tty(struct tty_driver *driver, | |||
373 | struct tty_struct *tty); | 405 | struct tty_struct *tty); |
374 | extern void tty_free_termios(struct tty_struct *tty); | 406 | extern void tty_free_termios(struct tty_struct *tty); |
375 | extern int is_current_pgrp_orphaned(void); | 407 | extern int is_current_pgrp_orphaned(void); |
376 | extern struct pid *tty_get_pgrp(struct tty_struct *tty); | ||
377 | extern int is_ignored(int sig); | 408 | extern int is_ignored(int sig); |
378 | extern int tty_signal(int sig, struct tty_struct *tty); | 409 | extern int tty_signal(int sig, struct tty_struct *tty); |
379 | extern void tty_hangup(struct tty_struct *tty); | 410 | extern void tty_hangup(struct tty_struct *tty); |
380 | extern void tty_vhangup(struct tty_struct *tty); | 411 | extern void tty_vhangup(struct tty_struct *tty); |
381 | extern void tty_vhangup_locked(struct tty_struct *tty); | 412 | extern void tty_vhangup_locked(struct tty_struct *tty); |
382 | extern void tty_vhangup_self(void); | ||
383 | extern void tty_unhangup(struct file *filp); | 413 | extern void tty_unhangup(struct file *filp); |
384 | extern int tty_hung_up_p(struct file *filp); | 414 | extern int tty_hung_up_p(struct file *filp); |
385 | extern void do_SAK(struct tty_struct *tty); | 415 | extern void do_SAK(struct tty_struct *tty); |
386 | extern void __do_SAK(struct tty_struct *tty); | 416 | extern void __do_SAK(struct tty_struct *tty); |
387 | extern void disassociate_ctty(int priv); | ||
388 | extern void no_tty(void); | 417 | extern void no_tty(void); |
389 | extern void tty_flip_buffer_push(struct tty_struct *tty); | ||
390 | extern void tty_flush_to_ldisc(struct tty_struct *tty); | 418 | extern void tty_flush_to_ldisc(struct tty_struct *tty); |
391 | extern void tty_buffer_free_all(struct tty_port *port); | 419 | extern void tty_buffer_free_all(struct tty_port *port); |
392 | extern void tty_buffer_flush(struct tty_struct *tty); | 420 | extern void tty_buffer_flush(struct tty_struct *tty); |
@@ -415,9 +443,6 @@ extern long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg); | |||
415 | extern int tty_mode_ioctl(struct tty_struct *tty, struct file *file, | 443 | extern int tty_mode_ioctl(struct tty_struct *tty, struct file *file, |
416 | unsigned int cmd, unsigned long arg); | 444 | unsigned int cmd, unsigned long arg); |
417 | extern int tty_perform_flush(struct tty_struct *tty, unsigned long arg); | 445 | extern int tty_perform_flush(struct tty_struct *tty, unsigned long arg); |
418 | extern dev_t tty_devnum(struct tty_struct *tty); | ||
419 | extern void proc_clear_tty(struct task_struct *p); | ||
420 | extern struct tty_struct *get_current_tty(void); | ||
421 | extern void tty_default_fops(struct file_operations *fops); | 446 | extern void tty_default_fops(struct file_operations *fops); |
422 | extern struct tty_struct *alloc_tty_struct(void); | 447 | extern struct tty_struct *alloc_tty_struct(void); |
423 | extern int tty_alloc_file(struct file *file); | 448 | extern int tty_alloc_file(struct file *file); |
@@ -543,9 +568,6 @@ static inline int tty_audit_push_task(struct task_struct *tsk, | |||
543 | } | 568 | } |
544 | #endif | 569 | #endif |
545 | 570 | ||
546 | /* tty_io.c */ | ||
547 | extern int __init tty_init(void); | ||
548 | |||
549 | /* tty_ioctl.c */ | 571 | /* tty_ioctl.c */ |
550 | extern int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file, | 572 | extern int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file, |
551 | unsigned int cmd, unsigned long arg); | 573 | unsigned int cmd, unsigned long arg); |
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index dd976cfb6131..756a60989294 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h | |||
@@ -40,6 +40,7 @@ | |||
40 | * void (*close)(struct tty_struct * tty, struct file * filp); | 40 | * void (*close)(struct tty_struct * tty, struct file * filp); |
41 | * | 41 | * |
42 | * This routine is called when a particular tty device is closed. | 42 | * This routine is called when a particular tty device is closed. |
43 | * Note: called even if the corresponding open() failed. | ||
43 | * | 44 | * |
44 | * Required method. | 45 | * Required method. |
45 | * | 46 | * |
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h index 2002344ed36a..e0f252633b47 100644 --- a/include/linux/tty_flip.h +++ b/include/linux/tty_flip.h | |||
@@ -1,28 +1,34 @@ | |||
1 | #ifndef _LINUX_TTY_FLIP_H | 1 | #ifndef _LINUX_TTY_FLIP_H |
2 | #define _LINUX_TTY_FLIP_H | 2 | #define _LINUX_TTY_FLIP_H |
3 | 3 | ||
4 | extern int tty_buffer_request_room(struct tty_struct *tty, size_t size); | 4 | extern int tty_buffer_request_room(struct tty_port *port, size_t size); |
5 | extern int tty_insert_flip_string_flags(struct tty_struct *tty, const unsigned char *chars, const char *flags, size_t size); | 5 | extern int tty_insert_flip_string_flags(struct tty_port *port, |
6 | extern int tty_insert_flip_string_fixed_flag(struct tty_struct *tty, const unsigned char *chars, char flag, size_t size); | 6 | const unsigned char *chars, const char *flags, size_t size); |
7 | extern int tty_prepare_flip_string(struct tty_struct *tty, unsigned char **chars, size_t size); | 7 | extern int tty_insert_flip_string_fixed_flag(struct tty_port *port, |
8 | extern int tty_prepare_flip_string_flags(struct tty_struct *tty, unsigned char **chars, char **flags, size_t size); | 8 | const unsigned char *chars, char flag, size_t size); |
9 | void tty_schedule_flip(struct tty_struct *tty); | 9 | extern int tty_prepare_flip_string(struct tty_port *port, |
10 | unsigned char **chars, size_t size); | ||
11 | extern int tty_prepare_flip_string_flags(struct tty_port *port, | ||
12 | unsigned char **chars, char **flags, size_t size); | ||
13 | extern void tty_flip_buffer_push(struct tty_port *port); | ||
14 | void tty_schedule_flip(struct tty_port *port); | ||
10 | 15 | ||
11 | static inline int tty_insert_flip_char(struct tty_struct *tty, | 16 | static inline int tty_insert_flip_char(struct tty_port *port, |
12 | unsigned char ch, char flag) | 17 | unsigned char ch, char flag) |
13 | { | 18 | { |
14 | struct tty_buffer *tb = tty->port->buf.tail; | 19 | struct tty_buffer *tb = port->buf.tail; |
15 | if (tb && tb->used < tb->size) { | 20 | if (tb && tb->used < tb->size) { |
16 | tb->flag_buf_ptr[tb->used] = flag; | 21 | tb->flag_buf_ptr[tb->used] = flag; |
17 | tb->char_buf_ptr[tb->used++] = ch; | 22 | tb->char_buf_ptr[tb->used++] = ch; |
18 | return 1; | 23 | return 1; |
19 | } | 24 | } |
20 | return tty_insert_flip_string_flags(tty, &ch, &flag, 1); | 25 | return tty_insert_flip_string_flags(port, &ch, &flag, 1); |
21 | } | 26 | } |
22 | 27 | ||
23 | static inline int tty_insert_flip_string(struct tty_struct *tty, const unsigned char *chars, size_t size) | 28 | static inline int tty_insert_flip_string(struct tty_port *port, |
29 | const unsigned char *chars, size_t size) | ||
24 | { | 30 | { |
25 | return tty_insert_flip_string_fixed_flag(tty, chars, TTY_NORMAL, size); | 31 | return tty_insert_flip_string_fixed_flag(port, chars, TTY_NORMAL, size); |
26 | } | 32 | } |
27 | 33 | ||
28 | #endif /* _LINUX_TTY_FLIP_H */ | 34 | #endif /* _LINUX_TTY_FLIP_H */ |
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h index fb79dd8d1537..455a0d7bf220 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h | |||
@@ -100,16 +100,14 @@ | |||
100 | * seek to perform this action quickly but should wait until | 100 | * seek to perform this action quickly but should wait until |
101 | * any pending driver I/O is completed. | 101 | * any pending driver I/O is completed. |
102 | * | 102 | * |
103 | * void (*dcd_change)(struct tty_struct *tty, unsigned int status, | 103 | * void (*dcd_change)(struct tty_struct *tty, unsigned int status) |
104 | * struct pps_event_time *ts) | ||
105 | * | 104 | * |
106 | * Tells the discipline that the DCD pin has changed its status and | 105 | * Tells the discipline that the DCD pin has changed its status. |
107 | * the relative timestamp. Pointer ts cannot be NULL. | 106 | * Used exclusively by the N_PPS (Pulse-Per-Second) line discipline. |
108 | */ | 107 | */ |
109 | 108 | ||
110 | #include <linux/fs.h> | 109 | #include <linux/fs.h> |
111 | #include <linux/wait.h> | 110 | #include <linux/wait.h> |
112 | #include <linux/pps_kernel.h> | ||
113 | #include <linux/wait.h> | 111 | #include <linux/wait.h> |
114 | 112 | ||
115 | struct tty_ldisc_ops { | 113 | struct tty_ldisc_ops { |
@@ -144,8 +142,7 @@ struct tty_ldisc_ops { | |||
144 | void (*receive_buf)(struct tty_struct *, const unsigned char *cp, | 142 | void (*receive_buf)(struct tty_struct *, const unsigned char *cp, |
145 | char *fp, int count); | 143 | char *fp, int count); |
146 | void (*write_wakeup)(struct tty_struct *); | 144 | void (*write_wakeup)(struct tty_struct *); |
147 | void (*dcd_change)(struct tty_struct *, unsigned int, | 145 | void (*dcd_change)(struct tty_struct *, unsigned int); |
148 | struct pps_event_time *); | ||
149 | 146 | ||
150 | struct module *owner; | 147 | struct module *owner; |
151 | 148 | ||