Skip to content

Commit

Permalink
HID: i2c-hid: Fill in physical device providing HID functionality
Browse files Browse the repository at this point in the history
Currently hid_connect() prints out following when I2C connected HID devices
is connected:

  hid-multitouch 0018:03EB:2136.0001: ... [ATML3432:00 03EB:2136] on

After "on " should read physical device name but it is left empty by the
driver.

Make it look better and fill in the physical device name.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Mika Westerberg authored and Jiri Kosina committed Sep 29, 2015
1 parent 0678072 commit f3984ed
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/hid/i2c-hid/i2c-hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,7 @@ static int i2c_hid_probe(struct i2c_client *client,

snprintf(hid->name, sizeof(hid->name), "%s %04hX:%04hX",
client->name, hid->vendor, hid->product);
strlcpy(hid->phys, dev_name(&client->dev), sizeof(hid->phys));

ret = hid_add_device(hid);
if (ret) {
Expand Down

0 comments on commit f3984ed

Please sign in to comment.