]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tty: fix kernel-doc for functions in tty.h
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Tue, 19 Sep 2023 08:51:50 +0000 (10:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Oct 2023 12:31:15 +0000 (14:31 +0200)
tty_kref_get() is already included in Documentation, but is not properly
formatted. Fix this.

tty_get_baud_rate() is neither properly formatted, nor is included. Fix
both.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230919085156.1578-10-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/driver-api/tty/tty_ioctl.rst
include/linux/tty.h

index 9b0be79fc15efb18670f6f88db60ef89abfc2f39..3ff1ac5e07f18284b05d4aa34ee8b75c1fa8b4a9 100644 (file)
@@ -5,3 +5,6 @@ TTY IOCTL Helpers
 =================
 
 .. kernel-doc:: drivers/tty/tty_ioctl.c
+
+.. kernel-doc:: include/linux/tty.h
+   :identifiers: tty_get_baud_rate
index 59d675f345e9f6ef7a6326df3b8d3276289bc084..4b6340ac2af28f556cde4aea6295a0cc11bc719a 100644 (file)
@@ -390,14 +390,12 @@ int vcs_init(void);
 extern const struct class tty_class;
 
 /**
- *     tty_kref_get            -       get a tty reference
- *     @tty: tty device
+ * tty_kref_get - get a tty reference
+ * @tty: tty device
  *
- *     Return a new reference to a tty object. The caller must hold
- *     sufficient locks/counts to ensure that their existing reference cannot
- *     go away
+ * Returns: a new reference to a tty object. The caller must hold sufficient
+ * locks/counts to ensure that their existing reference cannot go away
  */
-
 static inline struct tty_struct *tty_kref_get(struct tty_struct *tty)
 {
        if (tty)
@@ -435,14 +433,13 @@ void tty_encode_baud_rate(struct tty_struct *tty, speed_t ibaud,
                speed_t obaud);
 
 /**
- *     tty_get_baud_rate       -       get tty bit rates
- *     @tty: tty to query
+ * tty_get_baud_rate - get tty bit rates
+ * @tty: tty to query
  *
- *     Returns the baud rate as an integer for this terminal. The
- *     termios lock must be held by the caller and the terminal bit
- *     flags may be updated.
+ * Returns: the baud rate as an integer for this terminal. The termios lock
+ * must be held by the caller and the terminal bit flags may be updated.
  *
- *     Locking: none
+ * Locking: none
  */
 static inline speed_t tty_get_baud_rate(struct tty_struct *tty)
 {