drivers: sensor: max17262: 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:17:04 +01:00 committed by Carles Cufí
parent bda8878b03
commit 677050d46d

View file

@ -321,7 +321,7 @@ static const struct sensor_driver_api max17262_battery_driver_api = {
static struct max17262_data max17262_data_##n; \
\
static const struct max17262_config max17262_config_##n = { \
.i2c = DEVICE_DT_GET(DT_BUS(DT_DRV_INST(n))), \
.i2c = DEVICE_DT_GET(DT_INST_BUS(n)), \
.i2c_addr = DT_INST_REG_ADDR(n), \
.design_voltage = DT_INST_PROP(n, design_voltage), \
.desired_voltage = DT_INST_PROP(n, desired_voltage), \