]> Git Repo - linux.git/commitdiff
Input: gpio_keys_polled - suppress deferred probe error for gpio
authorUwe Kleine-König <[email protected]>
Tue, 5 Mar 2024 10:10:42 +0000 (11:10 +0100)
committerDmitry Torokhov <[email protected]>
Tue, 5 Mar 2024 17:16:37 +0000 (09:16 -0800)
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 <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
drivers/input/keyboard/gpio_keys_polled.c

index ba00ecfbd343bc796fd48f77db92659a1c36bccc..b41fd1240f4312e06935685d00aded64076c3513 100644 (file)
@@ -315,12 +315,10 @@ static int gpio_keys_polled_probe(struct platform_device *pdev)
 
                        error = devm_gpio_request_one(dev, button->gpio,
                                        flags, button->desc ? : DRV_NAME);
-                       if (error) {
-                               dev_err(dev,
-                                       "unable to claim gpio %u, err=%d\n",
-                                       button->gpio, error);
-                               return error;
-                       }
+                       if (error)
+                               return dev_err_probe(dev, error,
+                                                    "unable to claim gpio %u\n",
+                                                    button->gpio);
 
                        bdata->gpiod = gpio_to_desc(button->gpio);
                        if (!bdata->gpiod) {
This page took 0.052748 seconds and 4 git commands to generate.