]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
HID: make function from dbg_hid
authorJiri Slaby <jirislaby@gmail.com>
Sun, 9 Mar 2008 15:29:24 +0000 (16:29 +0100)
committerJiri Kosina <jkosina@suse.cz>
Tue, 22 Apr 2008 09:34:57 +0000 (11:34 +0200)
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>
include/linux/hid.h

index 5bf6282f163550fdf23cb68821d5280a5e1685ca..69ba58434dcb49c4823d951fe6c454722cdb0c39 100644 (file)
@@ -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