Message ID | 1443442508-94971-2-git-send-email-mika.westerberg@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Jiri Kosina |
Headers | show |
On 28 September 2015 at 14:15, Mika Westerberg <mika.westerberg@linux.intel.com> wrote: > 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> > --- > drivers/hid/i2c-hid/i2c-hid.c | 1 + > 1 file changed, 1 insertion(+) > > 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) { > -- Tested and Reviewed-by: Daniel Martin <consume.noise@gmail.com> -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sep 28 2015 or thereabouts, Mika Westerberg wrote: > 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> Cheers, Benjamin > drivers/hid/i2c-hid/i2c-hid.c | 1 + > 1 file changed, 1 insertion(+) > > 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) { > -- > 2.5.1 > -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, 28 Sep 2015, Mika Westerberg wrote: > 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> Applied to hid.git#for-4.4/i2c-hid. Thanks,
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) {
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> --- drivers/hid/i2c-hid/i2c-hid.c | 1 + 1 file changed, 1 insertion(+)