drivers: sensor: tmp112: use instance based macros

Replace usage of DT_DRV_INST with instance based macros.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2021-12-16 11:14:18 +01:00 committed by Carles Cufí
commit ad0855187a

View file

@ -202,7 +202,7 @@ int tmp112_init(const struct device *dev)
static struct tmp112_data tmp112_data_##inst; \ static struct tmp112_data tmp112_data_##inst; \
static const struct tmp112_config tmp112_config_##inst = { \ static const struct tmp112_config tmp112_config_##inst = { \
.bus = I2C_DT_SPEC_INST_GET(inst), \ .bus = I2C_DT_SPEC_INST_GET(inst), \
.cr = DT_ENUM_IDX(DT_DRV_INST(inst), conversion_rate), \ .cr = DT_INST_ENUM_IDX(inst, conversion_rate), \
.extended_mode = DT_INST_PROP(inst, extended_mode), \ .extended_mode = DT_INST_PROP(inst, extended_mode), \
}; \ }; \
\ \