]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/x86: lenovo-wmi-{capdata,other}: Fix HWMON channel visibility
authorRong Zhang <i@rong.moe>
Sat, 7 Feb 2026 17:23:27 +0000 (01:23 +0800)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 10 Feb 2026 15:22:40 +0000 (17:22 +0200)
commit5a5203a45b063a594e89a2aeaf9e4923893a5b4c
tree331cfcfac8c66a9ea30658c6264f5d0169ea83fd
parenteeeb4c9874bb7ad11d322156443b1d3ebfaaa1cf
platform/x86: lenovo-wmi-{capdata,other}: Fix HWMON channel visibility

The LWMI_SUPP_MAY_{GET,SET} macros are fundamentally broken. When I
introduced them, I meant to check LWMI_SUPP_VALID *and* the
corresponding bits for get/set capabilities. However, `supported &
LWMI_SUPP_MAY_{GET,SET}' means *or*, so it accidentally passes the check
when LWMI_SUPP_VALID is set.

Fix them by only including the corresponding get/set bit without
LWMI_SUPP_VALID. Meanwhile, rename them to LWMI_SUPP_{GET,SET} to make
them less confusing.

Fixes: 67d9a39ce85f ("platform/x86: lenovo-wmi-capdata: Wire up Fan Test Data")
Signed-off-by: Rong Zhang <i@rong.moe>
Link: https://patch.msgid.link/20260207172327.80111-1-i@rong.moe
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/lenovo/wmi-capdata.h
drivers/platform/x86/lenovo/wmi-other.c