summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/tty_io.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 336714cf370a..ef8ee34670c3 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -256,6 +256,13 @@ const char *tty_name(const struct tty_struct *tty)
EXPORT_SYMBOL(tty_name);
+const char *tty_driver_name(const struct tty_struct *tty)
+{
+ if (!tty || !tty->driver)
+ return "";
+ return tty->driver->name;
+}
+
static int tty_paranoia_check(struct tty_struct *tty, struct inode *inode,
const char *routine)
{