Skip to content

Commit 34ba365

Browse files
t-8chJiri Kosina
authored andcommitted
HID: i2c-hid: switch to standard debugging APIs
Instead of implementing a custom form of dynamic debugging we can use the standard debugging APIs. If the kernel is built with CONFIG_DYNAMIC_DEBUG this will be more discoverable and featureful. Also the previous module parameter "debug" is read-only so it can't actually be enabled. Signed-off-by: Thomas Weißschuh <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent d264dd3 commit 34ba365

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

drivers/hid/i2c-hid/i2c-hid-core.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,7 @@
6767
#define I2C_HID_PWR_ON 0x00
6868
#define I2C_HID_PWR_SLEEP 0x01
6969

70-
/* debug option */
71-
static bool debug;
72-
module_param(debug, bool, 0444);
73-
MODULE_PARM_DESC(debug, "print a lot of debug information");
74-
75-
#define i2c_hid_dbg(ihid, fmt, arg...) \
76-
do { \
77-
if (debug) \
78-
dev_printk(KERN_DEBUG, &(ihid)->client->dev, fmt, ##arg); \
79-
} while (0)
70+
#define i2c_hid_dbg(ihid, ...) dev_dbg(&(ihid)->client->dev, __VA_ARGS__)
8071

8172
struct i2c_hid_desc {
8273
__le16 wHIDDescLength;

0 commit comments

Comments
 (0)