aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hid.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/hid.h')
-rw-r--r--include/linux/hid.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 53489fd4d700..a0ebdace7baa 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -500,6 +500,14 @@ struct hid_device { /* device report descriptor */
500 500
501 /* handler for raw output data, used by hidraw */ 501 /* handler for raw output data, used by hidraw */
502 int (*hid_output_raw_report) (struct hid_device *, __u8 *, size_t); 502 int (*hid_output_raw_report) (struct hid_device *, __u8 *, size_t);
503
504 /* debugging support via debugfs */
505 unsigned short debug;
506 struct dentry *debug_dir;
507 struct dentry *debug_rdesc;
508 struct dentry *debug_events;
509 struct list_head debug_list;
510 wait_queue_head_t debug_wait;
503}; 511};
504 512
505static inline void *hid_get_drvdata(struct hid_device *hdev) 513static inline void *hid_get_drvdata(struct hid_device *hdev)
@@ -657,9 +665,7 @@ struct hid_ll_driver {
657 665
658/* HID core API */ 666/* HID core API */
659 667
660#ifdef CONFIG_HID_DEBUG
661extern int hid_debug; 668extern int hid_debug;
662#endif
663 669
664extern int hid_add_device(struct hid_device *); 670extern int hid_add_device(struct hid_device *);
665extern void hid_destroy_device(struct hid_device *); 671extern void hid_destroy_device(struct hid_device *);
@@ -815,21 +821,9 @@ int hid_pidff_init(struct hid_device *hid);
815#define hid_pidff_init NULL 821#define hid_pidff_init NULL
816#endif 822#endif
817 823
818#ifdef CONFIG_HID_DEBUG
819#define dbg_hid(format, arg...) if (hid_debug) \ 824#define dbg_hid(format, arg...) if (hid_debug) \
820 printk(KERN_DEBUG "%s: " format ,\ 825 printk(KERN_DEBUG "%s: " format ,\
821 __FILE__ , ## arg) 826 __FILE__ , ## arg)
822#define dbg_hid_line(format, arg...) if (hid_debug) \
823 printk(format, ## arg)
824#else
825static inline int __attribute__((format(printf, 1, 2)))
826dbg_hid(const char *fmt, ...)
827{
828 return 0;
829}
830#define dbg_hid_line dbg_hid
831#endif /* HID_DEBUG */
832
833#define err_hid(format, arg...) printk(KERN_ERR "%s: " format "\n" , \ 827#define err_hid(format, arg...) printk(KERN_ERR "%s: " format "\n" , \
834 __FILE__ , ## arg) 828 __FILE__ , ## arg)
835#endif /* HID_FF */ 829#endif /* HID_FF */