aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tty_driver.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/tty_driver.h')
-rw-r--r--include/linux/tty_driver.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index 85c95cd39bc3..21f69aca4505 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -125,6 +125,7 @@
125#include <linux/cdev.h> 125#include <linux/cdev.h>
126 126
127struct tty_struct; 127struct tty_struct;
128struct tty_driver;
128 129
129struct tty_operations { 130struct tty_operations {
130 int (*open)(struct tty_struct * tty, struct file * filp); 131 int (*open)(struct tty_struct * tty, struct file * filp);
@@ -157,6 +158,11 @@ struct tty_operations {
157 int (*tiocmget)(struct tty_struct *tty, struct file *file); 158 int (*tiocmget)(struct tty_struct *tty, struct file *file);
158 int (*tiocmset)(struct tty_struct *tty, struct file *file, 159 int (*tiocmset)(struct tty_struct *tty, struct file *file,
159 unsigned int set, unsigned int clear); 160 unsigned int set, unsigned int clear);
161#ifdef CONFIG_CONSOLE_POLL
162 int (*poll_init)(struct tty_driver *driver, int line, char *options);
163 int (*poll_get_char)(struct tty_driver *driver, int line);
164 void (*poll_put_char)(struct tty_driver *driver, int line, char ch);
165#endif
160}; 166};
161 167
162struct tty_driver { 168struct tty_driver {
@@ -220,6 +226,11 @@ struct tty_driver {
220 int (*tiocmget)(struct tty_struct *tty, struct file *file); 226 int (*tiocmget)(struct tty_struct *tty, struct file *file);
221 int (*tiocmset)(struct tty_struct *tty, struct file *file, 227 int (*tiocmset)(struct tty_struct *tty, struct file *file,
222 unsigned int set, unsigned int clear); 228 unsigned int set, unsigned int clear);
229#ifdef CONFIG_CONSOLE_POLL
230 int (*poll_init)(struct tty_driver *driver, int line, char *options);
231 int (*poll_get_char)(struct tty_driver *driver, int line);
232 void (*poll_put_char)(struct tty_driver *driver, int line, char ch);
233#endif
223 234
224 struct list_head tty_drivers; 235 struct list_head tty_drivers;
225}; 236};
@@ -230,6 +241,7 @@ struct tty_driver *alloc_tty_driver(int lines);
230void put_tty_driver(struct tty_driver *driver); 241void put_tty_driver(struct tty_driver *driver);
231void tty_set_operations(struct tty_driver *driver, 242void tty_set_operations(struct tty_driver *driver,
232 const struct tty_operations *op); 243 const struct tty_operations *op);
244extern struct tty_driver *tty_find_polling_driver(char *name, int *line);
233 245
234/* tty driver magic number */ 246/* tty driver magic number */
235#define TTY_DRIVER_MAGIC 0x5402 247#define TTY_DRIVER_MAGIC 0x5402