Commit 0944d07b authored by Kumar Gala's avatar Kumar Gala Committed by Anas Nashif
Browse files

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: default avatarKumar Gala <kumar.gala@linaro.org>
parent 651898e1
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -456,8 +456,9 @@ static const struct sensor_driver_api icm42605_driver_api = {
#define ICM42605_INIT(index)						\
	ICM42605_DEFINE_CONFIG(index);					\
	static struct icm42605_data icm42605_driver_##index;		\
	DEVICE_AND_API_INIT(icm42605_##index, DT_INST_LABEL(index),	\
			    icm42605_init, &icm42605_driver_##index,	\
	DEVICE_DT_INST_DEFINE(index, icm42605_init,			\
			    device_pm_control_nop,			\
			    &icm42605_driver_##index,			\
			    &icm42605_cfg_##index, POST_KERNEL,		\
			    CONFIG_SENSOR_INIT_PRIORITY,		\
			    &icm42605_driver_api);