[STABLE v5.10 4/5] HID: wacom: Write shared touch initial status only once

From: Lee Jones

Date: Mon Nov 09 2026 - 08:56:55 EST


From: Ping Cheng <ping.cheng@xxxxxxxxx>

[ Upstream commit cae3031c691dff0be61a26bc64e31a6939010d5c ]

For consistency with how the shared has_mute_touch_switch is handled
during registration, let's apply WRITE_ONCE to is_touch_on too.

Cc: stable@xxxxxxxxxxxxxxx
Fixes: ba16e5ffbaa1 ("HID: wacom: Advertise SW_MUTE_DEVICE capability prior to registration")
Reviewed-by: Lee Jones <lee@xxxxxxxxxx>
Signed-off-by: Ping Cheng <ping.cheng@xxxxxxxxx>
Signed-off-by: Jiri Kosina <jkosina@xxxxxxxx>
[Lee: Resolve context conflict around is_soft_touch_switch in
wacom_set_shared_values()]
Signed-off-by: Lee Jones <lee@xxxxxxxxxx>
---
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 465d075d16f9..ad570af50745 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -2353,7 +2353,7 @@ static void wacom_set_shared_values(struct wacom_wac *wacom_wac)

if (wacom_wac->has_mute_touch_switch) {
WRITE_ONCE(wacom_wac->shared->has_mute_touch_switch, true);
- wacom_wac->shared->is_touch_on = true;
+ WRITE_ONCE(wacom_wac->shared->is_touch_on, true);
}

if (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH) {
--
2.56.0.506.g506a7eabc5-goog