From: Rabin Vincent Date: Fri, 19 Feb 2016 10:27:53 +0000 (+0100) Subject: regulator: gpio: don't print error on EPROBE_DEFER X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0258382bf3985b736dde51a456a5a3c2cf7af958;p=openwrt%2Fstaging%2Fblogic.git regulator: gpio: don't print error on EPROBE_DEFER 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 Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c index 7bba8b747f30..a8718e98674a 100644 --- a/drivers/regulator/gpio-regulator.c +++ b/drivers/regulator/gpio-regulator.c @@ -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; } }