From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795035085; b=lcI2DpSFOjmoaoGMPcAJo3HGWBOMqZnODVEHXxH2+xbkMYWCX4jtOdxZWm+/mKkAUIbS u+UxsfEWBnc6+4Qyd0VWDbb3Ola4svGMey039eMJtBLFHc6Foh2U09OML6i8PS5+jqO7h jtO0oL7z80ahGaiB2TI0iFhfbSSDr9c2fY9n0D8ktVNxpGXu0K+V1W1I3bnLgAEIl3Dbz MKUs/BVSEWuEIm0sEu9cu2WJvHrfCs9kNQp4DW2ai6pwJ/Qo7QlnX66bIBZ9cwdJBZAUo tBFP7ufYm9YPPkxo0Ux+d365AlFOccvplsfDoQxMtJ3U0gGqj6Zs+hw8Qk84vV3U4mQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795035085; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=LuAltYH4OYsYMqbmima13aejL4kF8W7fmMd162fAxQY=; b=nJSBckqS8r/DMSBtSkXvrmFsTs61NQLH/Ai4KeK4I7Kk7p3Qql3NAujDDhnh87ataxiw 5/mmrQm3iQB3Lh6+WSsU3O2wgFq0nakTlqTJmrJRy8x0Ovk+tz6vX4vZgz28O7y4jUeE2 EwXcim3d+h7pDBn5iauwLDoeR9skkF70y7lMo6AaZW8C5CTN97yp7KQ0LZTOJt37ZmEKS VUNJJcmPjb/GCgvaT9TBS9Tl8+8J6r0P4tnPsGabV5Q6yyM9DDA7BoBp3mR2OIX0TZJ/8 MsVSNAAkO46m6do+tOr86Aw2LQdMdUG1plGuSt6nl2wRhBD4X7xUxNBDBahixIA+lnw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=QzQVr0sJ; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2C6F8606A320; Wed, 18 Nov 2026 20:51:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=QzQVr0sJ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F1951F000C4; Wed, 18 Nov 2026 20:51:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795035085; bh=LuAltYH4OYsYMqbmima13aejL4kF8W7fmMd162fAxQY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=QzQVr0sJNtJKFv2dro4b6w5jaZEytXjUls/9/OigEOTFS7Vp3Xx46GSPbSHWgBVQw 0Zxig/fzdGJcQNDWq16GFJeDQj/1tDDPUTBRxCyrxA0L69YjyD6IsCnX/Yqg/r/MM0 HFZT1xJgKnxkb8YDPDHEpMXXqyhE+WXzShctYW9k= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Lee Jones , Ping Cheng , Jiri Kosina Subject: [PATCH 6.6 0601/3318] HID: wacom: Use hdev->product in wacom_setup_touch_input_capabilities Date: Wed, 18 Nov 2026 15:20:23 +0100 Message-ID: <20261118150335.731347830@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261118150313.527275416@linuxfoundation.org> References: <20261118150313.527275416@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Lee Jones commit 86472508a7ef74b525e79a79d2d02d911a641d6b upstream. Replace the lookup-dependent 'wacom_wac->shared->touch->product' references with 'hdev->product' inside wacom_setup_touch_input_capabilities() since 'hdev' is already available (via container_of) and represents the touch device itself. Cc: stable@vger.kernel.org Signed-off-by: Lee Jones Acked-by: Ping Cheng Tested-by: Ping Cheng Signed-off-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman --- drivers/hid/wacom_wac.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -3929,8 +3929,8 @@ int wacom_setup_pen_input_capabilities(s int wacom_setup_touch_input_capabilities(struct input_dev *input_dev, struct wacom_wac *wacom_wac) { + struct hid_device *hdev = container_of(wacom_wac, struct wacom, wacom_wac)->hdev; struct wacom_features *features = &wacom_wac->features; - if (!(features->device_type & WACOM_DEVICETYPE_TOUCH)) return -ENODEV; @@ -3939,9 +3939,11 @@ int wacom_setup_touch_input_capabilities else __set_bit(INPUT_PROP_POINTER, input_dev->propbit); - if (features->type == HID_GENERIC) + if (features->type == HID_GENERIC) { + hid_dbg(hdev, "generic touch setup\n"); /* setup has already been done */ return 0; + } input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); __set_bit(BTN_TOUCH, input_dev->keybit); @@ -3973,19 +3975,17 @@ int wacom_setup_touch_input_capabilities input_dev->evbit[0] |= BIT_MASK(EV_SW); __set_bit(SW_MUTE_DEVICE, input_dev->swbit); - if (wacom_wac->shared->touch->product == 0x361) { + if (hdev->product == 0x361) { input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, 12440, 4, 0); input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, 8640, 4, 0); - } - else if (wacom_wac->shared->touch->product == 0x360) { + } else if (hdev->product == 0x360) { input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, 8960, 4, 0); input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, 5920, 4, 0); - } - else if (wacom_wac->shared->touch->product == 0x393) { + } else if (hdev->product == 0x393) { input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, 6400, 4, 0); input_set_abs_params(input_dev, ABS_MT_POSITION_Y, @@ -4015,8 +4015,8 @@ int wacom_setup_touch_input_capabilities fallthrough; case WACOM_27QHDT: - if (wacom_wac->shared->touch->product == 0x32C || - wacom_wac->shared->touch->product == 0xF6) { + if (hdev->product == 0x32C || + hdev->product == 0xF6) { input_dev->evbit[0] |= BIT_MASK(EV_SW); __set_bit(SW_MUTE_DEVICE, input_dev->swbit); wacom_wac->has_mute_touch_switch = true;