diff mbox

[2/3] HID: wacom: Remove useless conditions from 'wacom_query_tablet_data'

Message ID 1446507673-4458-2-git-send-email-killertofu@gmail.com (mailing list archive)
State New, archived
Delegated to: Jiri Kosina
Headers show

Commit Message

Jason Gerecke Nov. 2, 2015, 11:41 p.m. UTC
When support for the Cintiq Companion Hybrid and Cintiq Companion 2 was
added (36d3c51 and f7acb55), the 'wacom_query_tablet_data' function was
updated to include references to CINTIQ_HYBRID and CINTIQ_COMPANION_2
with the thought that they were necessary to switch the touch interface
into the proper mode. This is unnecessary, however, since those types
are only ever associated with the pen interface -- the touch interfaces
are either CINTIQ_24HDT or HID_GENERIC. To avoid confusion in the future,
we remove the unnecessary CINTIQ_HYBRID and CINTIQ_COMPANION_2 conditions.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
---
 drivers/hid/wacom_sys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ping Cheng Nov. 3, 2015, 1:40 a.m. UTC | #1
On Mon, Nov 2, 2015 at 3:41 PM, Jason Gerecke <killertofu@gmail.com> wrote:
> When support for the Cintiq Companion Hybrid and Cintiq Companion 2 was
> added (36d3c51 and f7acb55), the 'wacom_query_tablet_data' function was
> updated to include references to CINTIQ_HYBRID and CINTIQ_COMPANION_2
> with the thought that they were necessary to switch the touch interface
> into the proper mode. This is unnecessary, however, since those types
> are only ever associated with the pen interface -- the touch interfaces
> are either CINTIQ_24HDT or HID_GENERIC. To avoid confusion in the future,
> we remove the unnecessary CINTIQ_HYBRID and CINTIQ_COMPANION_2 conditions.
>
> Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>

Reviewed-by: Ping Cheng <pingc@wacom.com>

for this patch and the 3/3 of this set.

Ping

> ---
>  drivers/hid/wacom_sys.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
> index 45656e8..69ff5b5 100644
> --- a/drivers/hid/wacom_sys.c
> +++ b/drivers/hid/wacom_sys.c
> @@ -422,7 +422,7 @@ static int wacom_query_tablet_data(struct hid_device *hdev,
>                         /* MT Tablet PC touch */
>                         return wacom_set_device_mode(hdev, 3, 4, 4);
>                 }
> -               else if (features->type == WACOM_24HDT || features->type == CINTIQ_HYBRID || features->type == CINTIQ_COMPANION_2) {
> +               else if (features->type == WACOM_24HDT) {
>                         return wacom_set_device_mode(hdev, 18, 3, 2);
>                 }
>                 else if (features->type == WACOM_27QHDT) {
> --
> 2.6.2
>
--
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
Jiri Kosina Nov. 3, 2015, 1:39 p.m. UTC | #2
On Mon, 2 Nov 2015, Ping Cheng wrote:

> On Mon, Nov 2, 2015 at 3:41 PM, Jason Gerecke <killertofu@gmail.com> wrote:
> > When support for the Cintiq Companion Hybrid and Cintiq Companion 2 was
> > added (36d3c51 and f7acb55), the 'wacom_query_tablet_data' function was
> > updated to include references to CINTIQ_HYBRID and CINTIQ_COMPANION_2
> > with the thought that they were necessary to switch the touch interface
> > into the proper mode. This is unnecessary, however, since those types
> > are only ever associated with the pen interface -- the touch interfaces
> > are either CINTIQ_24HDT or HID_GENERIC. To avoid confusion in the future,
> > we remove the unnecessary CINTIQ_HYBRID and CINTIQ_COMPANION_2 conditions.
> >
> > Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
> 
> Reviewed-by: Ping Cheng <pingc@wacom.com>
> 
> for this patch and the 3/3 of this set.

This is really late in the game (the merge window is already open), but 
given the nature of the patches (we'll be sending them as -rc bugfixes 
later anyway), I've just picked those up to for-4.4/wacom.

1/1 I am sure you two will have some more discussion about :) so I am 
ignoring it for now.
diff mbox

Patch

diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index 45656e8..69ff5b5 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -422,7 +422,7 @@  static int wacom_query_tablet_data(struct hid_device *hdev,
 			/* MT Tablet PC touch */
 			return wacom_set_device_mode(hdev, 3, 4, 4);
 		}
-		else if (features->type == WACOM_24HDT || features->type == CINTIQ_HYBRID || features->type == CINTIQ_COMPANION_2) {
+		else if (features->type == WACOM_24HDT) {
 			return wacom_set_device_mode(hdev, 18, 3, 2);
 		}
 		else if (features->type == WACOM_27QHDT) {