Merge branches 'upstream', 'upstream-fixes' and 'debugfs' into for-linus
[firefly-linux-kernel-4.4.55.git] / include / linux / hid.h
index 53489fd4d7006e35e6fe7bc95a50a0a956aee8dd..a0ebdace7baa2fa496d2d8fc09cf1a2c0b6f1b60 100644 (file)
@@ -500,6 +500,14 @@ struct hid_device {                                                        /* device report descriptor */
 
        /* handler for raw output data, used by hidraw */
        int (*hid_output_raw_report) (struct hid_device *, __u8 *, size_t);
+
+       /* debugging support via debugfs */
+       unsigned short debug;
+       struct dentry *debug_dir;
+       struct dentry *debug_rdesc;
+       struct dentry *debug_events;
+       struct list_head debug_list;
+       wait_queue_head_t debug_wait;
 };
 
 static inline void *hid_get_drvdata(struct hid_device *hdev)
@@ -657,9 +665,7 @@ struct hid_ll_driver {
 
 /* HID core API */
 
-#ifdef CONFIG_HID_DEBUG
 extern int hid_debug;
-#endif
 
 extern int hid_add_device(struct hid_device *);
 extern void hid_destroy_device(struct hid_device *);
@@ -815,21 +821,9 @@ int hid_pidff_init(struct hid_device *hid);
 #define hid_pidff_init NULL
 #endif
 
-#ifdef CONFIG_HID_DEBUG
 #define dbg_hid(format, arg...) if (hid_debug) \
                                printk(KERN_DEBUG "%s: " format ,\
                                __FILE__ , ## arg)
-#define dbg_hid_line(format, arg...) if (hid_debug) \
-                               printk(format, ## arg)
-#else
-static inline int __attribute__((format(printf, 1, 2)))
-dbg_hid(const char *fmt, ...)
-{
-       return 0;
-}
-#define dbg_hid_line dbg_hid
-#endif /* HID_DEBUG */
-
 #define err_hid(format, arg...) printk(KERN_ERR "%s: " format "\n" , \
                __FILE__ , ## arg)
 #endif /* HID_FF */