[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241208-hid-ifdef-kunit-v1-1-cbea6077a233@weissschuh.net>
Date: Sun, 08 Dec 2024 13:01:51 +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 1/2] HID: input: 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: a608dc1c0639 ("HID: input: map battery system charging")
Signed-off-by: Thomas Weißschuh <linux@...ssschuh.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
Powered by blists - more mailing lists