diff options
Diffstat (limited to 'include/linux/tty_driver.h')
-rw-r--r-- | include/linux/tty_driver.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index 80e72dc564a5..3adc362f0bd2 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h | |||
@@ -296,11 +296,11 @@ struct tty_driver { | |||
296 | int name_base; /* offset of printed name */ | 296 | int name_base; /* offset of printed name */ |
297 | int major; /* major device number */ | 297 | int major; /* major device number */ |
298 | int minor_start; /* start of minor device number */ | 298 | int minor_start; /* start of minor device number */ |
299 | int num; /* number of devices allocated */ | 299 | unsigned int num; /* number of devices allocated */ |
300 | short type; /* type of tty driver */ | 300 | short type; /* type of tty driver */ |
301 | short subtype; /* subtype of tty driver */ | 301 | short subtype; /* subtype of tty driver */ |
302 | struct ktermios init_termios; /* Initial termios */ | 302 | struct ktermios init_termios; /* Initial termios */ |
303 | int flags; /* tty driver flags */ | 303 | unsigned long flags; /* tty driver flags */ |
304 | struct proc_dir_entry *proc_entry; /* /proc fs entry */ | 304 | struct proc_dir_entry *proc_entry; /* /proc fs entry */ |
305 | struct tty_driver *other; /* only used for the PTY driver */ | 305 | struct tty_driver *other; /* only used for the PTY driver */ |
306 | 306 | ||
@@ -322,7 +322,8 @@ struct tty_driver { | |||
322 | 322 | ||
323 | extern struct list_head tty_drivers; | 323 | extern struct list_head tty_drivers; |
324 | 324 | ||
325 | extern struct tty_driver *__alloc_tty_driver(int lines, struct module *owner); | 325 | extern struct tty_driver *__tty_alloc_driver(unsigned int lines, |
326 | struct module *owner, unsigned long flags); | ||
326 | extern void put_tty_driver(struct tty_driver *driver); | 327 | extern void put_tty_driver(struct tty_driver *driver); |
327 | extern void tty_set_operations(struct tty_driver *driver, | 328 | extern void tty_set_operations(struct tty_driver *driver, |
328 | const struct tty_operations *op); | 329 | const struct tty_operations *op); |
@@ -330,7 +331,21 @@ extern struct tty_driver *tty_find_polling_driver(char *name, int *line); | |||
330 | 331 | ||
331 | extern void tty_driver_kref_put(struct tty_driver *driver); | 332 | extern void tty_driver_kref_put(struct tty_driver *driver); |
332 | 333 | ||
333 | #define alloc_tty_driver(lines) __alloc_tty_driver(lines, THIS_MODULE) | 334 | /* Use TTY_DRIVER_* flags below */ |
335 | #define tty_alloc_driver(lines, flags) \ | ||
336 | __tty_alloc_driver(lines, THIS_MODULE, flags) | ||
337 | |||
338 | /* | ||
339 | * DEPRECATED Do not use this in new code, use tty_alloc_driver instead. | ||
340 | * (And change the return value checks.) | ||
341 | */ | ||
342 | static inline struct tty_driver *alloc_tty_driver(unsigned int lines) | ||
343 | { | ||
344 | struct tty_driver *ret = tty_alloc_driver(lines, 0); | ||
345 | if (IS_ERR(ret)) | ||
346 | return NULL; | ||
347 | return ret; | ||
348 | } | ||
334 | 349 | ||
335 | static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d) | 350 | static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d) |
336 | { | 351 | { |