[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241208-hid-ifdef-kunit-v1-2-cbea6077a233@weissschuh.net>
Date: Sun, 08 Dec 2024 13:01:52 +0100
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Jiri Kosina <jikos@...nel.org>, Benjamin Tissoires <bentiss@...nel.org>,
José Expósito <jose.exposito89@...il.com>
Cc: linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
Thomas Weißschuh <linux@...ssschuh.net>
Subject: [PATCH 2/2] HID: uclogic: fix test for CONFIG_HID_KUNIT_TEST=m
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@...ssschuh.net>
---
drivers/hid/hid-uclogic-core.c | 2 +-
drivers/hid/hid-uclogic-params.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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
--
2.47.1
Powered by blists - more mailing lists