diff options
Diffstat (limited to 'include/linux/hid.h')
-rw-r--r-- | include/linux/hid.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index 827ee748fd4c..eb53d9a9ae54 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -488,6 +488,11 @@ struct hid_descriptor { | |||
488 | #define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001)) | 488 | #define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001)) |
489 | 489 | ||
490 | /* HID core API */ | 490 | /* HID core API */ |
491 | |||
492 | #ifdef CONFIG_HID_DEBUG | ||
493 | extern int hid_debug; | ||
494 | #endif | ||
495 | |||
491 | extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); | 496 | extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); |
492 | extern void hidinput_report_event(struct hid_device *hid, struct hid_report *report); | 497 | extern void hidinput_report_event(struct hid_device *hid, struct hid_report *report); |
493 | extern int hidinput_connect(struct hid_device *); | 498 | extern int hidinput_connect(struct hid_device *); |
@@ -523,14 +528,19 @@ static inline int hid_pidff_init(struct hid_device *hid) { return -ENODEV; } | |||
523 | #else | 528 | #else |
524 | static inline int hid_ff_init(struct hid_device *hid) { return -1; } | 529 | static inline int hid_ff_init(struct hid_device *hid) { return -1; } |
525 | #endif | 530 | #endif |
526 | #ifdef DEBUG | 531 | |
527 | #define dbg(format, arg...) printk(KERN_DEBUG "%s: " format "\n" , \ | 532 | #ifdef CONFIG_HID_DEBUG |
528 | __FILE__ , ## arg) | 533 | #define dbg_hid(format, arg...) if (hid_debug) \ |
534 | printk(KERN_DEBUG "%s: " format ,\ | ||
535 | __FILE__ , ## arg) | ||
536 | #define dbg_hid_line(format, arg...) if (hid_debug) \ | ||
537 | printk(format, ## arg) | ||
529 | #else | 538 | #else |
530 | #define dbg(format, arg...) do {} while (0) | 539 | #define dbg_hid(format, arg...) do {} while (0) |
540 | #define dbg_hid_line dbg_hid | ||
531 | #endif | 541 | #endif |
532 | 542 | ||
533 | #define err(format, arg...) printk(KERN_ERR "%s: " format "\n" , \ | 543 | #define err_hid(format, arg...) printk(KERN_ERR "%s: " format "\n" , \ |
534 | __FILE__ , ## arg) | 544 | __FILE__ , ## arg) |
535 | #endif | 545 | #endif |
536 | 546 | ||