tty: core: Add tty_debug() for printk(KERN_DEBUG) messages
Introduce tty_debug() macro to output uniform debug information for tty core debug messages (function name and tty name). Note: printk(KERN_DEBUG) is retained here over pr_debug() since messages can be enabled in non-DEBUG builds. 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
3a6b02dc1f
commit
e2dfa3d387
@@ -709,4 +709,10 @@ static inline void proc_tty_register_driver(struct tty_driver *d) {}
|
||||
static inline void proc_tty_unregister_driver(struct tty_driver *d) {}
|
||||
#endif
|
||||
|
||||
#define tty_debug(tty, f, args...) \
|
||||
do { \
|
||||
printk(KERN_DEBUG "%s: %s: " f, __func__, \
|
||||
tty_name(tty), ##args); \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user