Thread (4 messages) 4 messages, 2 authors, 2024-12-09
STALE557d

[PATCH 1/2] HID: input: fix test for CONFIG_HID_KUNIT_TEST=m

From: Thomas Weißschuh <linux@weissschuh.net>
Date: 2024-12-08 12:02:00
Also in: lkml
Subsystem: hid core layer, the rest · Maintainers: Jiri Kosina, Benjamin Tissoires, Linus Torvalds

If CONFIG_HID_KUNIT_TEST is set to "m", the #ifdef test does not work.
Switch to IS_ENABLED() which works for both "m" and "y".

Fixes: a608dc1c0639 ("HID: input: map battery system charging")
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 drivers/hid/hid-input.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index fda9dce3da99808e04ce66dd7beec6731173e75f..8f065d89979c3577dcc17a6f0d52468d69f16c87 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -2388,6 +2388,6 @@ void hidinput_disconnect(struct hid_device *hid)
 }
 EXPORT_SYMBOL_GPL(hidinput_disconnect);
 
-#ifdef CONFIG_HID_KUNIT_TEST
+#if IS_ENABLED(CONFIG_HID_KUNIT_TEST)
 #include "hid-input-test.c"
 #endif
-- 
2.47.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help