Re: [PATCH 1/3] HID: wacom: Do not add suffix to name of devices with an unknown type
On Thu, 30 Apr 2015, 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 I have applied the series for for-4.2/wacom. -- Jiri Kosina SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/3] HID: wacom: Do not add suffix to name of devices with an unknown type
On Thu, 30 Apr 2015, 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.gere...@wacom.com I have applied the series for for-4.2/wacom. -- Jiri Kosina SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/3] HID: wacom: Do not add suffix to name of devices with an unknown type
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 > --- 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, and everything seems to be fine. The whole series is: Reviewed-by: Benjamin Tissoires 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 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/3] HID: wacom: Do not add suffix to name of devices with an unknown type
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.gere...@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 PenTouch, and everything seems to be fine. The whole series is: Reviewed-by: Benjamin Tissoires benjamin.tissoi...@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 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/3] HID: wacom: Do not add suffix to name of devices with an unknown type
On Thu, Apr 30, 2015 at 5:51 PM, 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 Reviewed-by: Ping Cheng for the whole set. Cheers, Ping > --- > 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 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/3] HID: wacom: Do not add suffix to name of devices with an unknown type
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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/3] HID: wacom: Do not add suffix to name of devices with an unknown type
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.gere...@wacom.com --- 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 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/3] HID: wacom: Do not add suffix to name of devices with an unknown type
On Thu, Apr 30, 2015 at 5:51 PM, Jason Gerecke killert...@gmail.com 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.gere...@wacom.com Reviewed-by: Ping Cheng pi...@wacom.com for the whole set. Cheers, Ping --- 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 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/