Skip to content

Commit a50e0d9

Browse files
gschwaerfabiobaltieri
authored andcommitted
kscan: input: fix multiple kscan inputs
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 <[email protected]>
1 parent d411421 commit a50e0d9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/kscan/kscan_input.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,10 @@ static const struct kscan_driver_api kscan_input_driver_api = {
101101
};
102102

103103
#define KSCAN_INPUT_INIT(index) \
104-
INPUT_CALLBACK_DEFINE(DEVICE_DT_GET(DT_INST_PARENT(index)), \
105-
kscan_input_cb, \
106-
(void *)DEVICE_DT_INST_GET(index)); \
104+
INPUT_CALLBACK_DEFINE_NAMED(DEVICE_DT_GET(DT_INST_PARENT(index)), \
105+
kscan_input_cb, \
106+
(void *)DEVICE_DT_INST_GET(index), \
107+
kscan_input_cb_##index); \
107108
static const struct kscan_input_config kscan_input_config_##index = { \
108109
.input_dev = DEVICE_DT_GET(DT_INST_PARENT(index)), \
109110
}; \

0 commit comments

Comments
 (0)