diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2015-09-28 14:15:08 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-09-29 12:04:28 +0200 |
commit | f3984edc171c9f1296502d6d5e41290785816736 (patch) | |
tree | e2327b937f9754b635c3e4ab410fd76ccd4f8c56 /drivers/hid | |
parent | HID: Make I2C a known bus in hid_connect() (diff) | |
download | linux-f3984edc171c9f1296502d6d5e41290785816736.tar.xz linux-f3984edc171c9f1296502d6d5e41290785816736.zip |
HID: i2c-hid: Fill in physical device providing HID functionality
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>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/i2c-hid/i2c-hid.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c index 2871f3c81a4c..10bd8e6e4c9c 100644 --- a/drivers/hid/i2c-hid/i2c-hid.c +++ b/drivers/hid/i2c-hid/i2c-hid.c @@ -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) { |