Re: [PATCH resend 2/2] input/serio/8042: Add firmware_id support

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

 



On Wed, Apr 09, 2014 at 10:47:50AM +0200, Hans de Goede wrote:
> Fill in the new serio firmware_id sysfs attribute for pnp instantiated
> 8042 serio ports.
> 
> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
> Acked-by: Peter Hutterer <peter.hutterer@xxxxxxxxx>
> ---
>  drivers/input/serio/i8042-x86ia64io.h | 26 ++++++++++++++++++++++++++
>  drivers/input/serio/i8042.c           |  6 ++++++
>  2 files changed, 32 insertions(+)
> 
> diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
> index 0ec9abb..3f9da83 100644
> --- a/drivers/input/serio/i8042-x86ia64io.h
> +++ b/drivers/input/serio/i8042-x86ia64io.h
> @@ -704,6 +704,8 @@ static char i8042_pnp_aux_name[32];
>  
>  static int i8042_pnp_kbd_probe(struct pnp_dev *dev, const struct pnp_device_id *did)
>  {
> +	struct pnp_id *id = dev->id;
> +
>  	if (pnp_port_valid(dev, 0) && pnp_port_len(dev, 0) == 1)
>  		i8042_pnp_data_reg = pnp_port_start(dev,0);
>  
> @@ -719,6 +721,17 @@ static int i8042_pnp_kbd_probe(struct pnp_dev *dev, const struct pnp_device_id *
>  		strlcat(i8042_pnp_kbd_name, pnp_dev_name(dev), sizeof(i8042_pnp_kbd_name));
>  	}
>  
> +	if (id) {
> +		strlcpy(i8042_kbd_firmware_id, id->id,
> +			sizeof(i8042_kbd_firmware_id));
> +		for (id = id->next; id; id = id->next) {
> +			strlcat(i8042_kbd_firmware_id, " ",
> +				sizeof(i8042_kbd_firmware_id));
> +			strlcat(i8042_kbd_firmware_id, id->id,
> +				sizeof(i8042_kbd_firmware_id));

Do we need all IDs? I'd expect we only interested in HID, not CIDs?

Thanks.

-- 
Dmitry
--
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