diff options
| author | Jiri Slaby (SUSE) <jirislaby@kernel.org> | 2025-03-17 10:00:29 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-03-20 18:00:51 +0300 |
| commit | 63f3cd5d80d720fc6c9fd321138bbbf322ade392 (patch) | |
| tree | fb80b853fe6ce49073faa2c8e82c4a5e5ef388d1 /include/linux/tty_driver.h | |
| parent | 109e06ae1dcf41d470705c54a67b123792424279 (diff) | |
| download | linux-63f3cd5d80d720fc6c9fd321138bbbf322ade392.tar.xz | |
tty: tty_driver: document both {,__}tty_alloc_driver() properly
__tty_alloc_driver()'s kernel-doc needed some care: describe the return
value using the standard "Returns:", and use the new enum tty_driver_flag
for @flags.
Then, the tty_alloc_driver() macro was undocumented, but referenced many
times in the docs. Copy the docs from the above (except the @owner
parameter, obviously).
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20250317070046.24386-15-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/tty_driver.h')
| -rw-r--r-- | include/linux/tty_driver.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index d0d940236580..0fe38befa1b8 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h @@ -564,7 +564,13 @@ struct tty_driver *tty_find_polling_driver(char *name, int *line); void tty_driver_kref_put(struct tty_driver *driver); -/* Use TTY_DRIVER_* flags below */ +/** + * tty_alloc_driver - allocate tty driver + * @lines: count of lines this driver can handle at most + * @flags: some of enum tty_driver_flag, will be set in driver->flags + * + * Returns: struct tty_driver or a PTR-encoded error (use IS_ERR() and friends). + */ #define tty_alloc_driver(lines, flags) \ __tty_alloc_driver(lines, THIS_MODULE, flags) |
