aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2016-01-11 01:40:59 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-01-27 18:01:44 -0500
commitc0cc1c5d6b67289ea2e77346e0161506b0d4f393 (patch)
tree72ca416062ce5d5602048205ed6f74cdb255f9cc /drivers/tty
parentece53405a1f8ddf60b78e1365addcad521b2c93f (diff)
tty: Fix comments for tty_ldisc_get()
tty_ldisc_get() returns ERR_PTR() values if unsuccessful, not NULL; fix function header documentation. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/tty_ldisc.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
index b2e8210639dd..4008f5f65345 100644
--- a/drivers/tty/tty_ldisc.c
+++ b/drivers/tty/tty_ldisc.c
@@ -140,9 +140,16 @@ static void put_ldops(struct tty_ldisc_ops *ldops)
140 * @disc: ldisc number 140 * @disc: ldisc number
141 * 141 *
142 * Takes a reference to a line discipline. Deals with refcounts and 142 * Takes a reference to a line discipline. Deals with refcounts and
143 * module locking counts. Returns NULL if the discipline is not available. 143 * module locking counts.
144 * Returns a pointer to the discipline and bumps the ref count if it is 144 *
145 * available 145 * Returns: -EINVAL if the discipline index is not [N_TTY..NR_LDISCS] or
146 * if the discipline is not registered
147 * -EAGAIN if request_module() failed to load or register the
148 * the discipline
149 * -ENOMEM if allocation failure
150 *
151 * Otherwise, returns a pointer to the discipline and bumps the
152 * ref count
146 * 153 *
147 * Locking: 154 * Locking:
148 * takes tty_ldiscs_lock to guard against ldisc races 155 * takes tty_ldiscs_lock to guard against ldisc races