drivers: sensor: icm42605: Fix use of deprecated API

Driver uses DEVICE_AND_API_INIT which is deprecated so convert
to using DEVICE_DT_INST_DEFINE instead.

Fixes #32151

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2021-02-09 22:03:25 -06:00 committed by Anas Nashif
commit 0944d07b55

View file

@ -456,8 +456,9 @@ static const struct sensor_driver_api icm42605_driver_api = {
#define ICM42605_INIT(index) \ #define ICM42605_INIT(index) \
ICM42605_DEFINE_CONFIG(index); \ ICM42605_DEFINE_CONFIG(index); \
static struct icm42605_data icm42605_driver_##index; \ static struct icm42605_data icm42605_driver_##index; \
DEVICE_AND_API_INIT(icm42605_##index, DT_INST_LABEL(index), \ DEVICE_DT_INST_DEFINE(index, icm42605_init, \
icm42605_init, &icm42605_driver_##index, \ device_pm_control_nop, \
&icm42605_driver_##index, \
&icm42605_cfg_##index, POST_KERNEL, \ &icm42605_cfg_##index, POST_KERNEL, \
CONFIG_SENSOR_INIT_PRIORITY, \ CONFIG_SENSOR_INIT_PRIORITY, \
&icm42605_driver_api); &icm42605_driver_api);