diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2008-03-09 16:29:24 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2008-04-22 11:34:57 +0200 |
commit | 1b184cf37f5cf098f07725b483a2055e95725476 (patch) | |
tree | 398529b9308e0d0b8c689bdb6fe8708e44625ce9 /include/linux | |
parent | 282bfd4cbcc2bbeb1a2cad1f42debd378e0b5ac9 (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.h | 6 |
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 |