aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2008-03-09 11:29:24 -0400
committerJiri Kosina <jkosina@suse.cz>2008-04-22 05:34:57 -0400
commit1b184cf37f5cf098f07725b483a2055e95725476 (patch)
tree398529b9308e0d0b8c689bdb6fe8708e44625ce9 /include/linux
parent282bfd4cbcc2bbeb1a2cad1f42debd378e0b5ac9 (diff)
HID: make function from dbg_hid
To check paramters even if debug is disabled, convert dbg_hid to inline function with __attribute__(format) checking. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/hid.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 5bf6282f1635..69ba58434dcb 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -569,7 +569,11 @@ static inline int hid_ff_init(struct hid_device *hid) { return -1; }
569#define dbg_hid_line(format, arg...) if (hid_debug) \ 569#define dbg_hid_line(format, arg...) if (hid_debug) \
570 printk(format, ## arg) 570 printk(format, ## arg)
571#else 571#else
572#define dbg_hid(format, arg...) do {} while (0) 572static inline int __attribute__((format(printf, 1, 2)))
573dbg_hid(const char *fmt, ...)
574{
575 return 0;
576}
573#define dbg_hid_line dbg_hid 577#define dbg_hid_line dbg_hid
574#endif 578#endif
575 579