diff options
author | Grygorii Strashko <grygorii.strashko@ti.com> | 2020-11-18 16:31:49 +0200 |
---|---|---|
committer | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2020-11-30 17:38:28 +0100 |
commit | 2ae136a34fce9bbeb7c582449b03bd4e05aac565 (patch) | |
tree | 93e9b2f4741302b6904289af2a8386b9335d0e03 | |
parent | 0aa42370084cb8c87f5485e04bee50612d4db644 (diff) | |
download | linux-2ae136a34fce9bbeb7c582449b03bd4e05aac565.tar.bz2 |
gpio: omap: handle deferred probe with dev_err_probe() for gpiochip_add_data()
The gpiochip_add_data() may return -EPROBE_DEFER which is not handled
properly by TI GPIO driver and causes unnecessary boot log messages.
Hence, add proper deferred probe handling with new dev_err_probe() API.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
-rw-r--r-- | drivers/gpio/gpio-omap.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 6d59e3a43761..e0a60aca3d27 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -1049,11 +1049,8 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc) irq->first = irq_base; ret = gpiochip_add_data(&bank->chip, bank); - if (ret) { - dev_err(bank->chip.parent, - "Could not register gpio chip %d\n", ret); - return ret; - } + if (ret) + return dev_err_probe(bank->chip.parent, ret, "Could not register gpio chip\n"); ret = devm_request_irq(bank->chip.parent, bank->irq, omap_gpio_irq_handler, |