1 /* SPDX-License-Identifier: GPL-2.0 */
3 * TTY core internal functions
6 #ifndef _TTY_INTERNAL_H
7 #define _TTY_INTERNAL_H
9 #define tty_msg(fn, tty, f, ...) \
10 fn("%s %s: " f, tty_driver_name(tty), tty_name(tty), ##__VA_ARGS__)
12 #define tty_debug(tty, f, ...) tty_msg(pr_debug, tty, f, ##__VA_ARGS__)
13 #define tty_notice(tty, f, ...) tty_msg(pr_notice, tty, f, ##__VA_ARGS__)
14 #define tty_warn(tty, f, ...) tty_msg(pr_warn, tty, f, ##__VA_ARGS__)
15 #define tty_err(tty, f, ...) tty_msg(pr_err, tty, f, ##__VA_ARGS__)
17 #define tty_info_ratelimited(tty, f, ...) \
18 tty_msg(pr_info_ratelimited, tty, f, ##__VA_ARGS__)