Commit 0b670b54 authored by Hermes Zhang's avatar Hermes Zhang Committed by Dmitry Torokhov

Input: gpio-keys - filter gpio_keys -EPROBE_DEFER error messages

commit ae42f928 ("gpio: Return EPROBE_DEFER if gc->to_irq is NULL")
make gpiod_to_irq() possible to return -EPROBE_DEFER when the racing
happens. This causes the following error message to be printed:

    gpio-keys gpio_keys: Unable to get irq number for GPIO 0, error -517

Fix that by changing dev_err() to dev_err_probe()
Signed-off-by: default avatarHermes Zhang <chenhuiz@axis.com>
Link: https://lore.kernel.org/r/20231229013657.692600-1-Hermes.Zhang@axis.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 435e84ec
...@@ -592,9 +592,9 @@ static int gpio_keys_setup_key(struct platform_device *pdev, ...@@ -592,9 +592,9 @@ static int gpio_keys_setup_key(struct platform_device *pdev,
irq = gpiod_to_irq(bdata->gpiod); irq = gpiod_to_irq(bdata->gpiod);
if (irq < 0) { if (irq < 0) {
error = irq; error = irq;
dev_err(dev, dev_err_probe(dev, error,
"Unable to get irq number for GPIO %d, error %d\n", "Unable to get irq number for GPIO %d\n",
button->gpio, error); button->gpio);
return error; return error;
} }
bdata->irq = irq; bdata->irq = irq;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment