drivers: regulator: pca9420: do not use DT_PROP_OR for booleans

DT_PROP() will evaluate to 0 when a boolean property is missing, so
there is no need to use DT_PROP_OR(..., false). Using _OR also has
side-effects, such as no errors when property is not defined in the
bindings.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2022-11-16 14:25:59 +01:00 committed by Carles Cufí
commit 9f1d25a2d1

View file

@ -579,7 +579,7 @@ static const struct regulator_driver_api api = {
.ilim_reg = DT_PROP_OR(node_id, ilim_reg, 0), \
.ilim_mask = DT_PROP_OR(node_id, ilim_mask, 0), \
.enable_inverted = DT_PROP(node_id, enable_inverted), \
.boot_on = DT_PROP_OR(node_id, regulator_boot_on, false), \
.boot_on = DT_PROP(node_id, regulator_boot_on), \
.num_modes = ARRAY_SIZE(allowed_modes_##ord), \
.initial_mode = DT_PROP_OR(DT_PARENT(node_id), \
regulator_initial_mode, 0), \