summaryrefslogtreecommitdiff
path: root/include/linux/tty.h
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2015-11-08 21:01:08 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-14 06:59:48 +0300
commit998b4a4571b87eb6795863e07683fa5d4e0398ba (patch)
tree1e69c6937a86f98f0aaff2951866477269d8c02c /include/linux/tty.h
parent9f25bc510e960c551dc295c2d1d60e3da334590c (diff)
downloadlinux-998b4a4571b87eb6795863e07683fa5d4e0398ba.tar.xz
tty: Improve tty_debug() macro
Incorporate suggestions for tty core debug macro improvements - printk(KERN_DEBUG) => pr_debug() - ##args => ##__VA_ARGS__ - remove do {} while() - output tty_name() first cc: Joe Perches <joe@perches.com> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r--include/linux/tty.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 5e31f1b99037..3695c884258a 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -667,10 +667,7 @@ 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)
+#define tty_debug(tty, f, ...) \
+ pr_debug("%s: %s: " f, tty_name(tty), __func__, ##__VA_ARGS__)
#endif