]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
regulator: gpio: don't print error on EPROBE_DEFER
authorRabin Vincent <rabin.vincent@axis.com>
Fri, 19 Feb 2016 10:27:53 +0000 (11:27 +0100)
committerMark Brown <broonie@kernel.org>
Sat, 20 Feb 2016 17:09:34 +0000 (02:09 +0900)
Don't print out an error with the driver sees EPROBE_DEFER when
attempting to get the gpio.  These errors are usually transient; the
probe will be retried later.

Signed-off-by: Rabin Vincent <rabin.vincent@axis.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/gpio-regulator.c

index 7bba8b747f30280cc0f6c72853cc17272ea8d87d..a8718e98674a273939f20d06627be943aab6aee7 100644 (file)
@@ -283,8 +283,10 @@ static int gpio_regulator_probe(struct platform_device *pdev)
                drvdata->nr_gpios = config->nr_gpios;
                ret = gpio_request_array(drvdata->gpios, drvdata->nr_gpios);
                if (ret) {
-                       dev_err(&pdev->dev,
-                       "Could not obtain regulator setting GPIOs: %d\n", ret);
+                       if (ret != -EPROBE_DEFER)
+                               dev_err(&pdev->dev,
+                                       "Could not obtain regulator setting GPIOs: %d\n",
+                                       ret);
                        goto err_memstate;
                }
        }