drivers: bma280: 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:
parent
3754a4f77f
commit
1f992e891c
|
@ -152,12 +152,11 @@ int bma280_init(struct device *dev)
|
|||
}
|
||||
#endif
|
||||
|
||||
dev->driver_api = &bma280_driver_api;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct bma280_data bma280_driver;
|
||||
|
||||
DEVICE_INIT(bma280, CONFIG_BMA280_NAME, bma280_init, &bma280_driver,
|
||||
NULL, POST_KERNEL, CONFIG_SENSOR_INIT_PRIORITY);
|
||||
DEVICE_AND_API_INIT(bma280, CONFIG_BMA280_NAME, bma280_init, &bma280_driver,
|
||||
NULL, POST_KERNEL, CONFIG_SENSOR_INIT_PRIORITY,
|
||||
&bma280_driver_api);
|
||||
|
|
Loading…
Reference in New Issue