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 <gero.schwaericke@posteo.de>
This commit is contained in:
parent
d411421a2b
commit
a50e0d9b3b
|
@ -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)), \
|
||||
}; \
|
||||
|
|
Loading…
Reference in New Issue