Skip to content

Commit

Permalink
drivers: sensor: lsm6dso: use DEVICE_DT_INS_FOREACH_ENABLED
Browse files Browse the repository at this point in the history
So that device is also instantiated if it is disabled but flagged as
zephyr,deferred-init.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
  • Loading branch information
gmarull committed Nov 6, 2023
1 parent 0df70bc commit 8cd00d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/sensor/lsm6dso/lsm6dso.c
Original file line number Diff line number Diff line change
Expand Up @@ -954,4 +954,4 @@ static int lsm6dso_init(const struct device *dev)
(LSM6DSO_CONFIG_I2C(inst))); \
LSM6DSO_DEVICE_INIT(inst)

DT_INST_FOREACH_STATUS_OKAY(LSM6DSO_DEFINE)
DEVICE_DT_INST_FOREACH_ENABLED(LSM6DSO_DEFINE)

0 comments on commit 8cd00d9

Please sign in to comment.