drivers: Modify drivers to use DEVICE_AND_API_INIT()

Modified drivers to use DEVICE_AND_API_INIT() instead of DEVICE_INIT()

This will make sure driver_api,is populated at build time and is exposed
to user space

Signed-off-by: Varun Sharma <varun.sharma@intel.com>
This commit is contained in:
Varun Sharma 2018-12-09 23:17:34 +05:30 committed by Andrew Boie
commit 77c643a5a3
19 changed files with 74 additions and 95 deletions

View file

@ -41,13 +41,14 @@ extern "C" {
*
* @param init_fn Pointer to the boot function to run
*
* @param level The initialization level, See DEVICE_INIT for details.
* @param level The initialization level, See DEVICE_AND_API_INIT for details.
*
* @param prio Priority within the selected initialization level. See
* DEVICE_INIT for details.
* DEVICE_AND_API_INIT for details.
*/
#define SYS_INIT(init_fn, level, prio) \
DEVICE_INIT(_SYS_NAME(init_fn), "", init_fn, NULL, NULL, level, prio)
DEVICE_AND_API_INIT(_SYS_NAME(init_fn), "", init_fn, NULL, NULL, level,\
prio, NULL)
/**
* @def SYS_DEVICE_DEFINE