device: implement device_is_ready as syscall
Instead of using device_usable_check() syscall, implement a new syscall for device_is_ready that uses z_device_is_ready underneath. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
b2b8fdf539
commit
47bfb6fb4c
2 changed files with 12 additions and 2 deletions
|
@ -789,9 +789,11 @@ static inline int z_impl_device_usable_check(const struct device *dev)
|
|||
* @retval false if the device is not ready for use or if a NULL device pointer
|
||||
* is passed as argument.
|
||||
*/
|
||||
static inline bool device_is_ready(const struct device *dev)
|
||||
__syscall bool device_is_ready(const struct device *dev);
|
||||
|
||||
static inline bool z_impl_device_is_ready(const struct device *dev)
|
||||
{
|
||||
return device_usable_check(dev) == 0;
|
||||
return z_device_is_ready(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue