]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
HID: wacom: Improve warning for tablets falling back to default resolution
authorJason Gerecke <jason.gerecke@wacom.com>
Tue, 30 Jul 2024 15:51:56 +0000 (08:51 -0700)
committerJiri Kosina <jkosina@suse.com>
Fri, 2 Aug 2024 11:02:46 +0000 (13:02 +0200)
When we encounter a usage mapped to ABS_X or ABS_Y which has a calculated
resolution of 0, we want to warn the user of this before setting a default
value. The previous language used the word "usage" but then printed out the
value of a "code" instead. We can improve this.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/wacom_wac.c

index 1f4564982b958448cdfbe15d7c88bb3693891733..b753b2f111fb6e688d0ba670e2cea207416a14bd 100644 (file)
@@ -1904,8 +1904,8 @@ static void wacom_map_usage(struct input_dev *input, struct hid_usage *usage,
                if ((code == ABS_X || code == ABS_Y) && !resolution) {
                        resolution = WACOM_INTUOS_RES;
                        hid_warn(input,
-                                "Wacom usage (%d) missing resolution \n",
-                                code);
+                                "Using default resolution for axis type 0x%x code 0x%x\n",
+                                type, code);
                }
                input_abs_set_res(input, code, resolution);
                break;