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:
parent
651898e13d
commit
0944d07b55
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue