diff mbox series

platform/x86: intel-hid: fix _DSM function index handling

Message ID 50eb664046b0d036a434c4a602087b791b6e796f.camel@mniewoehner.de
State Accepted
Commit 1620c80bba53af8c547bab34a1d3bc58319fe608
Headers show
Series platform/x86: intel-hid: fix _DSM function index handling | expand

Commit Message

Michael Niewöhner May 16, 2022, 10:23 a.m. UTC
intel_hid_dsm_fn_mask is a bit mask containing one bit for each function
index. Fix the function index check in intel_hid_evaluate_method
accordingly, which was missed in commit 97ab4516205e ("platform/x86:
intel-hid: fix _DSM function index handling").

Signed-off-by: Michael Niewöhner <linux@mniewoehner.de>
---
 drivers/platform/x86/intel/hid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/platform/x86/intel/hid.c b/drivers/platform/x86/intel/hid.c
index 13f8cf70b9ae..5c39d40a701b 100644
--- a/drivers/platform/x86/intel/hid.c
+++ b/drivers/platform/x86/intel/hid.c
@@ -238,7 +238,7 @@  static bool intel_hid_evaluate_method(acpi_handle handle,
 
        method_name = (char *)intel_hid_dsm_fn_to_method[fn_index];
 
-       if (!(intel_hid_dsm_fn_mask & fn_index))
+       if (!(intel_hid_dsm_fn_mask & BIT(fn_index)))
                goto skip_dsm_eval;
 
        obj = acpi_evaluate_dsm_typed(handle, &intel_dsm_guid,