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:
parent
052121ee7c
commit
77c643a5a3
19 changed files with 74 additions and 95 deletions
|
@ -203,12 +203,10 @@ int tmp112_init(struct device *dev)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
dev->driver_api = &tmp112_driver_api;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct tmp112_data tmp112_driver;
|
||||
|
||||
DEVICE_INIT(tmp112, CONFIG_TMP112_NAME, tmp112_init, &tmp112_driver,
|
||||
NULL, POST_KERNEL, CONFIG_SENSOR_INIT_PRIORITY);
|
||||
DEVICE_AND_API_INIT(tmp112, CONFIG_TMP112_NAME, tmp112_init, &tmp112_driver,
|
||||
NULL, POST_KERNEL, CONFIG_SENSOR_INIT_PRIORITY, &tmp112_driver_api);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue