From a50e0d9b3b2933a9ffd129d1dec8fc5caa0ed2f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gero=20Schw=C3=A4ricke?= Date: Thu, 26 Sep 2024 21:23:49 +0200 Subject: [PATCH] kscan: input: fix multiple kscan inputs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The kscan input callback does not use an instance specific name, so we can only ever have one instance of this type. Signed-off-by: Gero Schwäricke --- drivers/kscan/kscan_input.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/kscan/kscan_input.c b/drivers/kscan/kscan_input.c index 17481fc57d6..7e98ae4723e 100644 --- a/drivers/kscan/kscan_input.c +++ b/drivers/kscan/kscan_input.c @@ -101,9 +101,10 @@ static const struct kscan_driver_api kscan_input_driver_api = { }; #define KSCAN_INPUT_INIT(index) \ - INPUT_CALLBACK_DEFINE(DEVICE_DT_GET(DT_INST_PARENT(index)), \ - kscan_input_cb, \ - (void *)DEVICE_DT_INST_GET(index)); \ + INPUT_CALLBACK_DEFINE_NAMED(DEVICE_DT_GET(DT_INST_PARENT(index)), \ + kscan_input_cb, \ + (void *)DEVICE_DT_INST_GET(index), \ + kscan_input_cb_##index); \ static const struct kscan_input_config kscan_input_config_##index = { \ .input_dev = DEVICE_DT_GET(DT_INST_PARENT(index)), \ }; \