From: Mika Westerberg Date: Mon, 28 Sep 2015 12:15:08 +0000 (+0300) Subject: HID: i2c-hid: Fill in physical device providing HID functionality X-Git-Tag: firefly_0821_release~176^2~757^2^4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f3984edc171c9f1296502d6d5e41290785816736;p=firefly-linux-kernel-4.4.55.git 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 Acked-by: Benjamin Tissoires Reviewed-by: Daniel Martin Signed-off-by: Jiri Kosina --- 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) {