linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Jason Gerecke <killertofu@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>, Ping Cheng <pinglinux@gmail.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jason Gerecke <jason.gerecke@wacom.com>
Subject: Re: [PATCH 1/3] HID: wacom: Do not add suffix to name of devices with an unknown type
Date: Fri, 1 May 2015 16:35:12 -0400	[thread overview]
Message-ID: <20150501203512.GB10988@mail.corp.redhat.com> (raw)
In-Reply-To: <1430441515-30122-1-git-send-email-killertofu@gmail.com>

Hi Jason,

On Apr 30 2015 or thereabouts, Jason Gerecke wrote:
> The naming logic currently assumes that all devices will be a pen, finger,
> or pad. Though this has historically been the case, the new HID_GENERIC
> catch-all may cause us to probe devices with Wacom's 056A VID which aren't
> any of these types (e.g. the "Cintiq 24HDT Monitor Control"). This patch
> updates the logic so that no suffix will be added to the device name if
> the device type is unknown.
> 
> Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
> ---

I am not sure we need to split 2/3 & 3/3. But either way is fine.
I checked against a Bamboo PAD, Intuos Pro and a Bamboo Pen&Touch,
and everything seems to be fine.

The whole series is:

Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Cheers,
Benjamin

>  drivers/hid/wacom_sys.c | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
> index 9c57ac0..222baf5 100644
> --- a/drivers/hid/wacom_sys.c
> +++ b/drivers/hid/wacom_sys.c
> @@ -1440,12 +1440,15 @@ static void wacom_update_name(struct wacom *wacom)
>  	snprintf(wacom_wac->pad_name, sizeof(wacom_wac->pad_name),
>  		"%s Pad", wacom_wac->name);
>  
> -	if (features->device_type != BTN_TOOL_FINGER)
> +	if (features->device_type == BTN_TOOL_PEN) {
>  		strlcat(wacom_wac->name, " Pen", WACOM_NAME_MAX);
> -	else if (features->touch_max)
> -		strlcat(wacom_wac->name, " Finger", WACOM_NAME_MAX);
> -	else
> -		strlcat(wacom_wac->name, " Pad", WACOM_NAME_MAX);
> +	}
> +	else if (features->device_type == BTN_TOOL_FINGER) {
> +		if (features->touch_max)
> +			strlcat(wacom_wac->name, " Finger", WACOM_NAME_MAX);
> +		else
> +			strlcat(wacom_wac->name, " Pad", WACOM_NAME_MAX);
> +	}
>  }
>  
>  static int wacom_probe(struct hid_device *hdev,
> -- 
> 2.3.5
> 

  parent reply	other threads:[~2015-05-01 20:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-01  0:51 [PATCH 1/3] HID: wacom: Do not add suffix to name of devices with an unknown type Jason Gerecke
2015-05-01  0:51 ` [PATCH 2/3] HID: wacom: Discover device_type from HID descriptor for all devices Jason Gerecke
2015-05-01  0:51 ` [PATCH 3/3] HID: wacom: Fail probe if HID_GENERIC device has unknown device_type Jason Gerecke
2015-05-01  1:20 ` [PATCH 1/3] HID: wacom: Do not add suffix to name of devices with an unknown type Ping Cheng
2015-05-01 20:35 ` Benjamin Tissoires [this message]
2015-05-04  8:02 ` Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150501203512.GB10988@mail.corp.redhat.com \
    --to=benjamin.tissoires@redhat.com \
    --cc=jason.gerecke@wacom.com \
    --cc=jkosina@suse.cz \
    --cc=killertofu@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pinglinux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).