diff options
Diffstat (limited to 'include')
-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 44b64f0d0555..898103b401f1 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -497,6 +497,11 @@ struct hid_descriptor { | |||
497 | #define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001)) | 497 | #define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001)) |
498 | 498 | ||
499 | /* HID core API */ | 499 | /* HID core API */ |
500 | |||
501 | #ifdef CONFIG_HID_DEBUG | ||
502 | extern int hid_debug; | ||
503 | #endif | ||
504 | |||
500 | extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); | 505 | extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); |
501 | extern void hidinput_report_event(struct hid_device *hid, struct hid_report *report); | 506 | extern void hidinput_report_event(struct hid_device *hid, struct hid_report *report); |
502 | extern int hidinput_connect(struct hid_device *); | 507 | extern int hidinput_connect(struct hid_device *); |
@@ -533,14 +538,19 @@ static inline int hid_pidff_init(struct hid_device *hid) { return -ENODEV; } | |||
533 | #else | 538 | #else |
534 | static inline int hid_ff_init(struct hid_device *hid) { return -1; } | 539 | static inline int hid_ff_init(struct hid_device *hid) { return -1; } |
535 | #endif | 540 | #endif |
536 | #ifdef DEBUG | 541 | |
537 | #define dbg(format, arg...) printk(KERN_DEBUG "%s: " format "\n" , \ | 542 | #ifdef CONFIG_HID_DEBUG |
538 | __FILE__ , ## arg) | 543 | #define dbg_hid(format, arg...) if (hid_debug) \ |
544 | printk(KERN_DEBUG "%s: " format ,\ | ||
545 | __FILE__ , ## arg) | ||
546 | #define dbg_hid_line(format, arg...) if (hid_debug) \ | ||
547 | printk(format, ## arg) | ||
539 | #else | 548 | #else |
540 | #define dbg(format, arg...) do {} while (0) | 549 | #define dbg_hid(format, arg...) do {} while (0) |
550 | #define dbg_hid_line dbg_hid | ||
541 | #endif | 551 | #endif |
542 | 552 | ||
543 | #define err(format, arg...) printk(KERN_ERR "%s: " format "\n" , \ | 553 | #define err_hid(format, arg...) printk(KERN_ERR "%s: " format "\n" , \ |
544 | __FILE__ , ## arg) | 554 | __FILE__ , ## arg) |
545 | #endif | 555 | #endif |
546 | 556 | ||