Skip to content

Commit 963465a

Browse files
Uwe Kleine-Königdtor
authored andcommitted
Input: gpio_keys_polled - suppress deferred probe error for gpio
On a PC Engines APU our admins are faced with: $ dmesg | grep -c "gpio-keys-polled gpio-keys-polled: unable to claim gpio 0, err=-517" 261 Such a message always appears when e.g. a new USB device is plugged in. Suppress this message which considerably clutters the kernel log for EPROBE_DEFER (i.e. -517). Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20240305101042.10953-2-u.kleine-koenig@pengutronix.de Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 7105e92 commit 963465a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

drivers/input/keyboard/gpio_keys_polled.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,10 @@ static int gpio_keys_polled_probe(struct platform_device *pdev)
315315

316316
error = devm_gpio_request_one(dev, button->gpio,
317317
flags, button->desc ? : DRV_NAME);
318-
if (error) {
319-
dev_err(dev,
320-
"unable to claim gpio %u, err=%d\n",
321-
button->gpio, error);
322-
return error;
323-
}
318+
if (error)
319+
return dev_err_probe(dev, error,
320+
"unable to claim gpio %u\n",
321+
button->gpio);
324322

325323
bdata->gpiod = gpio_to_desc(button->gpio);
326324
if (!bdata->gpiod) {

0 commit comments

Comments
 (0)