diff --git a/include/device.h b/include/device.h index db281421d7d..ecb8be50f4a 100644 --- a/include/device.h +++ b/include/device.h @@ -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. diff --git a/kernel/device.c b/kernel/device.c index cfd2551ad36..72ba96834ce 100644 --- a/kernel/device.c +++ b/kernel/device.c @@ -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