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:
Gerard Marull-Paretas 2021-05-10 09:50:43 +02:00 committed by Anas Nashif
parent 8ef9554f7e
commit 7835600c1e

View file

@ -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, \