提交 c0cc1c5d 编写于 作者: P Peter Hurley 提交者: Greg Kroah-Hartman

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: NPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 ece53405
......@@ -140,9 +140,16 @@ static void put_ldops(struct tty_ldisc_ops *ldops)
* @disc: ldisc number
*
* Takes a reference to a line discipline. Deals with refcounts and
* module locking counts. Returns NULL if the discipline is not available.
* Returns a pointer to the discipline and bumps the ref count if it is
* available
* module locking counts.
*
* Returns: -EINVAL if the discipline index is not [N_TTY..NR_LDISCS] or
* if the discipline is not registered
* -EAGAIN if request_module() failed to load or register the
* the discipline
* -ENOMEM if allocation failure
*
* Otherwise, returns a pointer to the discipline and bumps the
* ref count
*
* Locking:
* takes tty_ldiscs_lock to guard against ldisc races
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册