drivers: lsm9ds0_mfd: Initialise driver with DEVICE_AND_API_INIT

Replace DEVICE_INIT with DEVICE_AND_API_INIT to reduce code size

Signed-off-by: Punit Vara <punit.vara@intel.com>
This commit is contained in:
Punit Vara 2018-02-04 17:42:52 +05:30 committed by Maureen Helm
parent c93ba2f017
commit 97a3c74191
1 changed files with 3 additions and 5 deletions

View File

@ -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);