mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
tty: core: Add helper fn to deref tty driver name
Similar to tty_name(), add tty_driver_name() helper to safely dereference tty->driver->name (otherwise return empty string). Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
25080652a2
commit
0a083eddae
@@ -420,6 +420,7 @@ static inline struct tty_struct *tty_kref_get(struct tty_struct *tty)
|
||||
}
|
||||
|
||||
extern const char *tty_name(const struct tty_struct *tty);
|
||||
extern const char *tty_driver_name(const struct tty_struct *tty);
|
||||
extern void tty_wait_until_sent(struct tty_struct *tty, long timeout);
|
||||
extern int __tty_check_change(struct tty_struct *tty, int sig);
|
||||
extern int tty_check_change(struct tty_struct *tty);
|
||||
|
||||
Reference in New Issue
Block a user