Re: [PATCH 2/2] HID: i2c-hid: Fill in physical device providing HID functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
> ---

Acked-by: Benjamin Tissoires <benjamin.tissoires@xxxxxxxxxx>

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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux