diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2022-12-23 02:53:34 +0000 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2023-01-18 09:40:53 +0100 |
commit | 34ba3657a503184e8d9b64afac7f2d83ddae52fb (patch) | |
tree | 032a6c5763454512f410ed507f62e8e10a8ad8ea /drivers/hid | |
parent | d264dd3bbbd16b56239e889023fbe49413a58eaf (diff) | |
download | linux-stable-34ba3657a503184e8d9b64afac7f2d83ddae52fb.tar.gz linux-stable-34ba3657a503184e8d9b64afac7f2d83ddae52fb.tar.bz2 linux-stable-34ba3657a503184e8d9b64afac7f2d83ddae52fb.zip |
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 <linux@weissschuh.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/i2c-hid/i2c-hid-core.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c index b86b62f97108..b4ed21f25600 100644 --- a/drivers/hid/i2c-hid/i2c-hid-core.c +++ b/drivers/hid/i2c-hid/i2c-hid-core.c @@ -67,16 +67,7 @@ #define I2C_HID_PWR_ON 0x00 #define I2C_HID_PWR_SLEEP 0x01 -/* debug option */ -static bool debug; -module_param(debug, bool, 0444); -MODULE_PARM_DESC(debug, "print a lot of debug information"); - -#define i2c_hid_dbg(ihid, fmt, arg...) \ -do { \ - if (debug) \ - dev_printk(KERN_DEBUG, &(ihid)->client->dev, fmt, ##arg); \ -} while (0) +#define i2c_hid_dbg(ihid, ...) dev_dbg(&(ihid)->client->dev, __VA_ARGS__) struct i2c_hid_desc { __le16 wHIDDescLength; |