drivers: sensor: examplesensor: use GPIO_DT_SPEC_INST_GET
Instance version of the GPIO_DT_SPEC_GET was recently introduced. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
8ef9554f7e
commit
7835600c1e
|
@ -75,7 +75,7 @@ static int examplesensor_init(const struct device *dev)
|
||||||
static struct examplesensor_data examplesensor_data_##i; \
|
static struct examplesensor_data examplesensor_data_##i; \
|
||||||
\
|
\
|
||||||
static const struct examplesensor_config examplesensor_config_##i = { \
|
static const struct examplesensor_config examplesensor_config_##i = { \
|
||||||
.input = GPIO_DT_SPEC_GET(DT_DRV_INST(i), input_gpios), \
|
.input = GPIO_DT_SPEC_INST_GET(i, input_gpios), \
|
||||||
}; \
|
}; \
|
||||||
\
|
\
|
||||||
DEVICE_DT_INST_DEFINE(i, examplesensor_init, NULL, \
|
DEVICE_DT_INST_DEFINE(i, examplesensor_init, NULL, \
|
||||||
|
|
Loading…
Reference in a new issue