[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211210111138.1248187-3-tero.kristo@linux.intel.com>
Date: Fri, 10 Dec 2021 13:11:35 +0200
From: Tero Kristo <tero.kristo@...ux.intel.com>
To: linux-input@...r.kernel.org, benjamin.tissoires@...hat.com,
jikos@...nel.org, mika.westerberg@...ux.intel.com,
tero.kristo@...ux.intel.com
Cc: linux-kernel@...r.kernel.org, dmitry.torokhov@...il.com,
peter.hutterer@...-t.net
Subject: [PATCHv4 2/5] HID: hid-input: Add suffix also for HID_DG_PEN
From: Mika Westerberg <mika.westerberg@...ux.intel.com>
This and HID_DG_STYLUS are pretty much the same thing so add suffix for
HID_DG_PEN too. This makes the input device name look better.
While doing this, remove the suffix override from hid-multitouch, as it
is now handled by hid-input. Also, the suffix override done by
hid-multitouch was wrong, as it mapped HID_DG_PEN => "Stylus" and
HID_DG_STYLUS => "Pen".
Signed-off-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
Signed-off-by: Tero Kristo <tero.kristo@...ux.intel.com>
---
drivers/hid/hid-input.c | 1 +
drivers/hid/hid-multitouch.c | 3 ---
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index ad718ceb8af3..78205e445652 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -1741,6 +1741,7 @@ static struct hid_input *hidinput_allocate(struct hid_device *hid,
case HID_GD_MOUSE:
suffix = "Mouse";
break;
+ case HID_DG_PEN:
case HID_DG_STYLUS:
suffix = "Pen";
break;
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 082376a6cb3d..99eabfb4145b 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -1606,9 +1606,6 @@ static int mt_input_configured(struct hid_device *hdev, struct hid_input *hi)
case HID_DG_STYLUS:
/* force BTN_STYLUS to allow tablet matching in udev */
__set_bit(BTN_STYLUS, hi->input->keybit);
- fallthrough;
- case HID_DG_PEN:
- suffix = "Stylus";
break;
default:
suffix = "UNKNOWN";
--
2.25.1
Powered by blists - more mailing lists