drivers: gpio: use gpio_is_ready_dt helper function
Update `struct gpio_dt_spec` use with gpio_is_ready_dt() Signed-off-by: Nick Ward <nix.ward@gmail.com>
This commit is contained in:
parent
3f0ee7f6db
commit
2d65acca3a
184 changed files with 248 additions and 248 deletions
|
@ -964,7 +964,7 @@ static int mcp2515_init(const struct device *dev)
|
|||
}
|
||||
|
||||
/* Initialize interrupt handling */
|
||||
if (!device_is_ready(dev_cfg->int_gpio.port)) {
|
||||
if (!gpio_is_ready_dt(&dev_cfg->int_gpio)) {
|
||||
LOG_ERR("Interrupt GPIO port not ready");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ static int can_transceiver_gpio_init(const struct device *dev)
|
|||
|
||||
#if ANY_INST_HAS_ENABLE_GPIOS
|
||||
if (config->enable_gpio.port != NULL) {
|
||||
if (!device_is_ready(config->enable_gpio.port)) {
|
||||
if (!gpio_is_ready_dt(&config->enable_gpio)) {
|
||||
LOG_ERR("enable pin GPIO device not ready");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ static int can_transceiver_gpio_init(const struct device *dev)
|
|||
|
||||
#if ANY_INST_HAS_STANDBY_GPIOS
|
||||
if (config->standby_gpio.port != NULL) {
|
||||
if (!device_is_ready(config->standby_gpio.port)) {
|
||||
if (!gpio_is_ready_dt(&config->standby_gpio)) {
|
||||
LOG_ERR("standby pin GPIO device not ready");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue