* [PATCH] regulator: gpio: don't print error on EPROBE_DEFER
@ 2016-02-19 10:27 Rabin Vincent
0 siblings, 0 replies; only message in thread
From: Rabin Vincent @ 2016-02-19 10:27 UTC (permalink / raw)
To: lgirdwood, broonie; +Cc: linux-kernel, Rabin Vincent
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>
---
drivers/regulator/gpio-regulator.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c
index 7bba8b7..a8718e9 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;
}
}
--
2.7.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-02-19 10:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-19 10:27 [PATCH] regulator: gpio: don't print error on EPROBE_DEFER Rabin Vincent
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®