From f2ffc4374070cf60b5667279d6de974ef009b023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jo=C5=84czyk?= Date: Thu, 7 Aug 2014 15:26:27 +0200 Subject: [PATCH] Enable i2c Hid debugging --- drivers/hid/i2c-hid/i2c-hid.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c index 21aafc8..7060d32 100644 --- a/drivers/hid/i2c-hid/i2c-hid.c +++ b/drivers/hid/i2c-hid/i2c-hid.c @@ -49,7 +49,7 @@ #define I2C_HID_PWR_SLEEP 0x01 /* debug option */ -static bool debug; +static bool debug = 1; module_param(debug, bool, 0444); MODULE_PARM_DESC(debug, "print a lot of debug information"); @@ -633,7 +633,7 @@ static int i2c_hid_parse(struct hid_device *hid) rsize = le16_to_cpu(hdesc->wReportDescLength); if (!rsize || rsize > HID_MAX_DESCRIPTOR_SIZE) { - dbg_hid("weird size of report descriptor (%u)\n", rsize); + i2c_hid_dbg("weird size of report descriptor (%u)\n", rsize); return -EINVAL; } @@ -649,7 +649,7 @@ static int i2c_hid_parse(struct hid_device *hid) rdesc = kzalloc(rsize, GFP_KERNEL); if (!rdesc) { - dbg_hid("couldn't allocate rdesc memory\n"); + i2c_hid_dbg("couldn't allocate rdesc memory\n"); return -ENOMEM; } @@ -667,7 +667,7 @@ static int i2c_hid_parse(struct hid_device *hid) ret = hid_parse_report(hid, rdesc, rsize); kfree(rdesc); if (ret) { - dbg_hid("parsing report descriptor failed\n"); + i2c_hid_dbg("parsing report descriptor failed\n"); return ret; } @@ -926,7 +926,7 @@ static int i2c_hid_probe(struct i2c_client *client, __u16 hidRegister; struct i2c_hid_platform_data *platform_data = client->dev.platform_data; - dbg_hid("HID probe called for i2c 0x%02x\n", client->addr); + i2c_hid_dbg("HID probe called for i2c 0x%02x\n", client->addr); if (!client->irq) { dev_err(&client->dev, -- 1.7.9.5