summaryrefslogtreecommitdiff
path: root/drivers/tty/tty.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-08 14:51:29 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-15 10:24:58 +0200
commitda5d669e00d2c437b3f508d60add417fc74f4bb6 (patch)
tree0b81223bd34c121a64b7f8a288e5ff10798be9b5 /drivers/tty/tty.h
parent4d5a64cbc7add9e2697080c6bb78f961e9bbd2c3 (diff)
tty: audit: move some local functions out of tty.h
The functions tty_audit_add_data() and tty_audit_tiocsti() are local to the tty core code, and do not need to be in a "kernel-wide" header file so move them to drivers/tty/tty.h Cc: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20210408125134.3016837-9-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty.h')
-rw-r--r--drivers/tty/tty.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/tty/tty.h b/drivers/tty/tty.h
index 75624d7d84ae..55003840cd68 100644
--- a/drivers/tty/tty.h
+++ b/drivers/tty/tty.h
@@ -17,4 +17,18 @@
#define tty_info_ratelimited(tty, f, ...) \
tty_msg(pr_info_ratelimited, tty, f, ##__VA_ARGS__)
+/* tty_audit.c */
+#ifdef CONFIG_AUDIT
+void tty_audit_add_data(struct tty_struct *tty, const void *data, size_t size);
+void tty_audit_tiocsti(struct tty_struct *tty, char ch);
+#else
+static inline void tty_audit_add_data(struct tty_struct *tty, const void *data,
+ size_t size)
+{
+}
+static inline void tty_audit_tiocsti(struct tty_struct *tty, char ch)
+{
+}
+#endif
+
#endif