diff mbox series

[2/2] HID: uclogic: fix test for CONFIG_HID_KUNIT_TEST=m

Message ID 20241208-hid-ifdef-kunit-v1-2-cbea6077a233@weissschuh.net (mailing list archive)
State New
Delegated to: Jiri Kosina
Headers show
Series HID: fix test for CONFIG_HID_KUNIT_TEST=m | expand

Commit Message

Thomas Weißschuh Dec. 8, 2024, 12:01 p.m. UTC
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: a251d6576d2a ("HID: uclogic: Handle wireless device reconnection")
Fixes: a64cbf3ce631 ("HID: uclogic: Refactor UGEE v2 string descriptor parsing")
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 drivers/hid/hid-uclogic-core.c   | 2 +-
 drivers/hid/hid-uclogic-params.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/hid/hid-uclogic-core.c b/drivers/hid/hid-uclogic-core.c
index d8008933c052f5c9b5df9dadc5bce353f3c5b948..a824df67add9eb1d3dd7776fefd8f6f079bf509b 100644
--- a/drivers/hid/hid-uclogic-core.c
+++ b/drivers/hid/hid-uclogic-core.c
@@ -571,6 +571,6 @@  MODULE_DESCRIPTION("HID driver for UC-Logic devices not fully compliant with HID
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("HID driver for UC-Logic devices not fully compliant with HID standard");
 
-#ifdef CONFIG_HID_KUNIT_TEST
+#if IS_ENABLED(CONFIG_HID_KUNIT_TEST)
 #include "hid-uclogic-core-test.c"
 #endif
diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c
index ef26c7defcf61ced86b07100002e572780f23305..b5d4bb77c83c7e1ab3051d3b619993bc1b08204d 100644
--- a/drivers/hid/hid-uclogic-params.c
+++ b/drivers/hid/hid-uclogic-params.c
@@ -1860,6 +1860,6 @@  int uclogic_params_init(struct uclogic_params *params,
 	return rc;
 }
 
-#ifdef CONFIG_HID_KUNIT_TEST
+#if IS_ENABLED(CONFIG_HID_KUNIT_TEST)
 #include "hid-uclogic-params-test.c"
 #endif