diff --git a/drivers/comparator/comparator_shell.c b/drivers/comparator/comparator_shell.c index d8dafc35973..2723e170cef 100644 --- a/drivers/comparator/comparator_shell.c +++ b/drivers/comparator/comparator_shell.c @@ -216,9 +216,9 @@ static int cmd_trigger_is_pending(const struct shell *sh, size_t argc, char **ar return 0; } -static bool device_is_comp_and_ready(const struct device *dev) +static bool device_is_comp(const struct device *dev) { - return device_is_ready(dev) && DEVICE_API_IS(comparator, dev); + return DEVICE_API_IS(comparator, dev); } static void dsub_set_trigger_lookup_1(size_t idx, struct shell_static_entry *entry) @@ -233,7 +233,7 @@ SHELL_DYNAMIC_CMD_CREATE(dsub_set_trigger_1, dsub_set_trigger_lookup_1); static void dsub_set_trigger_lookup_0(size_t idx, struct shell_static_entry *entry) { - const struct device *dev = shell_device_filter(idx, device_is_comp_and_ready); + const struct device *dev = shell_device_filter(idx, device_is_comp); entry->syntax = dev != NULL ? dev->name : NULL; entry->handler = NULL; @@ -245,7 +245,7 @@ SHELL_DYNAMIC_CMD_CREATE(dsub_set_trigger_0, dsub_set_trigger_lookup_0); static void dsub_device_lookup_0(size_t idx, struct shell_static_entry *entry) { - const struct device *dev = shell_device_filter(idx, device_is_comp_and_ready); + const struct device *dev = shell_device_filter(idx, device_is_comp); entry->syntax = (dev != NULL) ? dev->name : NULL; entry->handler = NULL; diff --git a/drivers/led/led_shell.c b/drivers/led/led_shell.c index eda7fd27eae..65db93c6756 100644 --- a/drivers/led/led_shell.c +++ b/drivers/led/led_shell.c @@ -330,14 +330,14 @@ cmd_write_channels(const struct shell *sh, size_t argc, char **argv) return err; } -static bool device_is_led_and_ready(const struct device *dev) +static bool device_is_led(const struct device *dev) { - return device_is_ready(dev) && DEVICE_API_IS(led, dev); + return DEVICE_API_IS(led, dev); } static void device_name_get(size_t idx, struct shell_static_entry *entry) { - const struct device *dev = shell_device_filter(idx, device_is_led_and_ready); + const struct device *dev = shell_device_filter(idx, device_is_led); entry->syntax = (dev != NULL) ? dev->name : NULL; entry->handler = NULL; diff --git a/drivers/pwm/pwm_shell.c b/drivers/pwm/pwm_shell.c index e7cbcc0391d..e827710286e 100644 --- a/drivers/pwm/pwm_shell.c +++ b/drivers/pwm/pwm_shell.c @@ -126,14 +126,14 @@ static int cmd_nsec(const struct shell *sh, size_t argc, char **argv) return 0; } -static bool device_is_pwm_and_ready(const struct device *dev) +static bool device_is_pwm(const struct device *dev) { - return device_is_ready(dev) && DEVICE_API_IS(pwm, dev); + return DEVICE_API_IS(pwm, dev); } static void device_name_get(size_t idx, struct shell_static_entry *entry) { - const struct device *dev = shell_device_filter(idx, device_is_pwm_and_ready); + const struct device *dev = shell_device_filter(idx, device_is_pwm); entry->syntax = (dev != NULL) ? dev->name : NULL; entry->handler = NULL; diff --git a/drivers/stepper/stepper_shell.c b/drivers/stepper/stepper_shell.c index be35ba4945c..6b5d8035f90 100644 --- a/drivers/stepper/stepper_shell.c +++ b/drivers/stepper/stepper_shell.c @@ -67,9 +67,9 @@ static void print_callback(const struct device *dev, const enum stepper_event ev } } -static bool stepper_device_check(const struct device *dev) +static bool device_is_stepper(const struct device *dev) { - return DEVICE_API_IS(stepper, dev) && device_is_ready(dev); + return DEVICE_API_IS(stepper, dev); } static const struct stepper_direction_map stepper_direction_map[] = { @@ -119,7 +119,7 @@ SHELL_DYNAMIC_CMD_CREATE(dsub_stepper_microstep, cmd_stepper_microstep); static void cmd_pos_stepper_motor_name(size_t idx, struct shell_static_entry *entry) { - const struct device *dev = shell_device_filter(idx, stepper_device_check); + const struct device *dev = shell_device_filter(idx, device_is_stepper); entry->syntax = (dev != NULL) ? dev->name : NULL; entry->handler = NULL; @@ -131,7 +131,7 @@ SHELL_DYNAMIC_CMD_CREATE(dsub_pos_stepper_motor_name, cmd_pos_stepper_motor_name static void cmd_pos_stepper_motor_name_dir(size_t idx, struct shell_static_entry *entry) { - const struct device *dev = shell_device_filter(idx, stepper_device_check); + const struct device *dev = shell_device_filter(idx, device_is_stepper); if (dev != NULL) { entry->syntax = dev->name; @@ -147,7 +147,7 @@ SHELL_DYNAMIC_CMD_CREATE(dsub_pos_stepper_motor_name_dir, cmd_pos_stepper_motor_ static void cmd_pos_stepper_motor_name_microstep(size_t idx, struct shell_static_entry *entry) { - const struct device *dev = shell_device_filter(idx, stepper_device_check); + const struct device *dev = shell_device_filter(idx, device_is_stepper); if (dev != NULL) { entry->syntax = dev->name;