Skip to content

Commit

Permalink
kscan: input: fix multiple kscan inputs
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
gschwaer authored and fabiobaltieri committed Sep 30, 2024
1 parent d411421 commit a50e0d9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/kscan/kscan_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)), \
}; \
Expand Down

0 comments on commit a50e0d9

Please sign in to comment.