diff --git a/drivers/sensor/lsm9ds0_mfd/lsm9ds0_mfd.c b/drivers/sensor/lsm9ds0_mfd/lsm9ds0_mfd.c index d0439d8669a..7cb629d2167 100644 --- a/drivers/sensor/lsm9ds0_mfd/lsm9ds0_mfd.c +++ b/drivers/sensor/lsm9ds0_mfd/lsm9ds0_mfd.c @@ -781,8 +781,6 @@ int lsm9ds0_mfd_init(struct device *dev) return -EIO; } - dev->driver_api = &lsm9ds0_mfd_api_funcs; - return 0; } @@ -793,6 +791,6 @@ static const struct lsm9ds0_mfd_config lsm9ds0_mfd_config = { static struct lsm9ds0_mfd_data lsm9ds0_mfd_data; -DEVICE_INIT(lsm9ds0_mfd, CONFIG_LSM9DS0_MFD_DEV_NAME, lsm9ds0_mfd_init, - &lsm9ds0_mfd_data, &lsm9ds0_mfd_config, POST_KERNEL, - CONFIG_SENSOR_INIT_PRIORITY); +DEVICE_AND_API_INIT(lsm9ds0_mfd, CONFIG_LSM9DS0_MFD_DEV_NAME, lsm9ds0_mfd_init, + &lsm9ds0_mfd_data, &lsm9ds0_mfd_config, POST_KERNEL, + CONFIG_SENSOR_INIT_PRIORITY, &lsm9ds0_mfd_api_funcs);