device: s/z_device_ready/z_device_is_ready
Rename z_device_ready to z_device_is_ready. Function name suggests a boolean result this way, in line with other functions (e.g. device_is_ready). Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
08e8dfcd6e
commit
b2b8fdf539
2 changed files with 5 additions and 5 deletions
|
@ -739,7 +739,7 @@ size_t z_device_get_all_static(const struct device * *devices);
|
|||
*
|
||||
* @return true if and only if the device is available for use.
|
||||
*/
|
||||
bool z_device_ready(const struct device *dev);
|
||||
bool z_device_is_ready(const struct device *dev);
|
||||
|
||||
/** @brief Determine whether a device is ready for use
|
||||
*
|
||||
|
@ -752,7 +752,7 @@ bool z_device_ready(const struct device *dev);
|
|||
*/
|
||||
static inline int z_device_usable_check(const struct device *dev)
|
||||
{
|
||||
return z_device_ready(dev) ? 0 : -ENODEV;
|
||||
return z_device_is_ready(dev) ? 0 : -ENODEV;
|
||||
}
|
||||
|
||||
/** @brief Determine whether a device is ready for use.
|
||||
|
|
|
@ -106,13 +106,13 @@ const struct device *z_impl_device_get_binding(const char *name)
|
|||
* performed. Reserve string comparisons for a fallback.
|
||||
*/
|
||||
for (dev = __device_start; dev != __device_end; dev++) {
|
||||
if (z_device_ready(dev) && (dev->name == name)) {
|
||||
if (z_device_is_ready(dev) && (dev->name == name)) {
|
||||
return dev;
|
||||
}
|
||||
}
|
||||
|
||||
for (dev = __device_start; dev != __device_end; dev++) {
|
||||
if (z_device_ready(dev) && (strcmp(name, dev->name) == 0)) {
|
||||
if (z_device_is_ready(dev) && (strcmp(name, dev->name) == 0)) {
|
||||
return dev;
|
||||
}
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ size_t z_device_get_all_static(struct device const **devices)
|
|||
return __device_end - __device_start;
|
||||
}
|
||||
|
||||
bool z_device_ready(const struct device *dev)
|
||||
bool z_device_is_ready(const struct device *dev)
|
||||
{
|
||||
/*
|
||||
* if an invalid device pointer is passed as argument, this call
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue