summaryrefslogtreecommitdiff
path: root/include/linux/tty.h
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-06-04 13:35:37 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-13 17:30:54 -0700
commit057eb856eda1d957c0f1155eaa90739221f809a7 (patch)
tree0f538f728b63c4d0545d4340b2fc175a64ffeb75 /include/linux/tty.h
parent04831dc154df9b83c3e5fd54b18448da507871f7 (diff)
downloadlwn-057eb856eda1d957c0f1155eaa90739221f809a7.tar.gz
lwn-057eb856eda1d957c0f1155eaa90739221f809a7.zip
TTY: add tty_port_register_device helper
This will automatically assign tty_port to tty_driver's port array for later recall in tty_init_dev. This is intended to be called instead of tty_register_device. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r--include/linux/tty.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 45ef71df0e72..40b18d7ad929 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -497,6 +497,9 @@ extern int tty_write_lock(struct tty_struct *tty, int ndelay);
#define tty_is_writelocked(tty) (mutex_is_locked(&tty->atomic_write_lock))
extern void tty_port_init(struct tty_port *port);
+extern struct device *tty_port_register_device(struct tty_port *port,
+ struct tty_driver *driver, unsigned index,
+ struct device *device);
extern int tty_port_alloc_xmit_buf(struct tty_port *port);
extern void tty_port_free_xmit_buf(struct tty_port *port);
extern void tty_port_put(struct tty_port *port);