aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/i2c-hid
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@gmail.com>2012-12-04 10:27:49 -0500
committerJiri Kosina <jkosina@suse.cz>2012-12-05 05:07:14 -0500
commit9972dcc29cd1fc1b550656eb04496df6dab3dc42 (patch)
treeaab57723335c593f5a3dd7ec8b8698aa3846f2fb /drivers/hid/i2c-hid
parent317b204a131c36df564bd71214e9e18348a084c9 (diff)
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>
Diffstat (limited to 'drivers/hid/i2c-hid')
-rw-r--r--drivers/hid/i2c-hid/i2c-hid.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index e0d097deb067..035a0cdd129e 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -740,10 +740,10 @@ static int __devinit i2c_hid_init_irq(struct i2c_client *client)
740 IRQF_TRIGGER_FALLING | IRQF_ONESHOT, 740 IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
741 client->name, ihid); 741 client->name, ihid);
742 if (ret < 0) { 742 if (ret < 0) {
743 dev_dbg(&client->dev, 743 dev_warn(&client->dev,
744 "Could not register for %s interrupt, irq = %d," 744 "Could not register for %s interrupt, irq = %d,"
745 " ret = %d\n", 745 " ret = %d\n",
746 client->name, client->irq, ret); 746 client->name, client->irq, ret);
747 747
748 return ret; 748 return ret;
749 } 749 }
@@ -769,7 +769,8 @@ static int __devinit i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid)
769 __func__, 4, ihid->hdesc_buffer); 769 __func__, 4, ihid->hdesc_buffer);
770 770
771 if (ret) { 771 if (ret) {
772 dev_err(&client->dev, "HID_DESCR_LENGTH_CMD Fail (ret=%d)\n", 772 dev_err(&client->dev,
773 "unable to fetch the size of HID descriptor (ret=%d)\n",
773 ret); 774 ret);
774 return -ENODEV; 775 return -ENODEV;
775 } 776 }
@@ -784,7 +785,7 @@ static int __devinit i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid)
784 /* check bcdVersion == 1.0 */ 785 /* check bcdVersion == 1.0 */
785 if (le16_to_cpu(hdesc->bcdVersion) != 0x0100) { 786 if (le16_to_cpu(hdesc->bcdVersion) != 0x0100) {
786 dev_err(&client->dev, 787 dev_err(&client->dev,
787 "unexpected HID descriptor bcdVersion (0x%04x)\n", 788 "unexpected HID descriptor bcdVersion (0x%04hx)\n",
788 le16_to_cpu(hdesc->bcdVersion)); 789 le16_to_cpu(hdesc->bcdVersion));
789 return -ENODEV; 790 return -ENODEV;
790 } 791 }
@@ -870,7 +871,7 @@ static int __devinit i2c_hid_probe(struct i2c_client *client,
870 hid->vendor = le16_to_cpu(ihid->hdesc.wVendorID); 871 hid->vendor = le16_to_cpu(ihid->hdesc.wVendorID);
871 hid->product = le16_to_cpu(ihid->hdesc.wProductID); 872 hid->product = le16_to_cpu(ihid->hdesc.wProductID);
872 873
873 snprintf(hid->name, sizeof(hid->name), "%s %04X:%04X", 874 snprintf(hid->name, sizeof(hid->name), "%s %04hX:%04hX",
874 client->name, hid->vendor, hid->product); 875 client->name, hid->vendor, hid->product);
875 876
876 ret = hid_add_device(hid); 877 ret = hid_add_device(hid);