HID: i2c-hid: fix error messages
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index e0d097d..035a0cd 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -740,10 +740,10 @@
IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
client->name, ihid);
if (ret < 0) {
- dev_dbg(&client->dev,
+ dev_warn(&client->dev,
"Could not register for %s interrupt, irq = %d,"
" ret = %d\n",
- client->name, client->irq, ret);
+ client->name, client->irq, ret);
return ret;
}
@@ -769,7 +769,8 @@
__func__, 4, ihid->hdesc_buffer);
if (ret) {
- dev_err(&client->dev, "HID_DESCR_LENGTH_CMD Fail (ret=%d)\n",
+ dev_err(&client->dev,
+ "unable to fetch the size of HID descriptor (ret=%d)\n",
ret);
return -ENODEV;
}
@@ -784,7 +785,7 @@
/* check bcdVersion == 1.0 */
if (le16_to_cpu(hdesc->bcdVersion) != 0x0100) {
dev_err(&client->dev,
- "unexpected HID descriptor bcdVersion (0x%04x)\n",
+ "unexpected HID descriptor bcdVersion (0x%04hx)\n",
le16_to_cpu(hdesc->bcdVersion));
return -ENODEV;
}
@@ -870,7 +871,7 @@
hid->vendor = le16_to_cpu(ihid->hdesc.wVendorID);
hid->product = le16_to_cpu(ihid->hdesc.wProductID);
- snprintf(hid->name, sizeof(hid->name), "%s %04X:%04X",
+ snprintf(hid->name, sizeof(hid->name), "%s %04hX:%04hX",
client->name, hid->vendor, hid->product);
ret = hid_add_device(hid);