summaryrefslogtreecommitdiff
path: root/drivers/tty/tty_port.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-08-07 23:47:49 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-14 03:50:19 +0400
commit72a33bf58c50892bce7ee4f58d487e818dec1c7e (patch)
treee6d8d86603f8ea9aad512e3c880358904d475f58 /drivers/tty/tty_port.c
parentc4d6ebeb7d78ea8eabd5efe9ef876fe371cb5f4b (diff)
downloadlinux-72a33bf58c50892bce7ee4f58d487e818dec1c7e.tar.xz
TTY: tty_port, add some documentation
I forgot to document tty_port_register_device and tty_port_install when they were added. Fix it now. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_port.c')
-rw-r--r--drivers/tty/tty_port.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c
index 5246763cff0c..c2f0592bcb2c 100644
--- a/drivers/tty/tty_port.c
+++ b/drivers/tty/tty_port.c
@@ -33,6 +33,17 @@ void tty_port_init(struct tty_port *port)
}
EXPORT_SYMBOL(tty_port_init);
+/**
+ * tty_port_register_device - register tty device
+ * @port: tty_port of the device
+ * @driver: tty_driver for this device
+ * @index: index of the tty
+ * @device: parent if exists, otherwise NULL
+ *
+ * It is the same as tty_register_device except the provided @port is linked to
+ * a concrete tty specified by @index. Use this or tty_port_install (or both).
+ * Call tty_port_link_device as a last resort.
+ */
struct device *tty_port_register_device(struct tty_port *port,
struct tty_driver *driver, unsigned index,
struct device *device)
@@ -422,6 +433,16 @@ void tty_port_close(struct tty_port *port, struct tty_struct *tty,
}
EXPORT_SYMBOL(tty_port_close);
+/**
+ * tty_port_install - generic tty->ops->install handler
+ * @port: tty_port of the device
+ * @driver: tty_driver for this device
+ * @tty: tty to be installed
+ *
+ * It is the same as tty_standard_install except the provided @port is linked
+ * to a concrete tty specified by @tty. Use this or tty_port_register_device
+ * (or both). Call tty_port_link_device as a last resort.
+ */
int tty_port_install(struct tty_port *port, struct tty_driver *driver,
struct tty_struct *tty)
{