aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2008-03-09 16:29:24 +0100
committerJiri Kosina <jkosina@suse.cz>2008-04-22 11:34:57 +0200
commit1b184cf37f5cf098f07725b483a2055e95725476 (patch)
tree398529b9308e0d0b8c689bdb6fe8708e44625ce9 /include
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')
-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 5bf6282f163..69ba58434dc 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; }
#define dbg_hid_line(format, arg...) if (hid_debug) \
printk(format, ## arg)
#else
-#define dbg_hid(format, arg...) do {} while (0)
+static inline int __attribute__((format(printf, 1, 2)))
+dbg_hid(const char *fmt, ...)
+{
+ return 0;
+}
#define dbg_hid_line dbg_hid
#endif