[U-Boot] [PATCH 29/55] dm: power: Don't return an error when regulators are not autoset
Simon Glass
sjg at chromium.org
Fri Jul 3 02:16:06 CEST 2015
Not all regulators can be set up automatically. Adjust the code so that
regulators_enable_boot_on() will return success when some are skipped.
Only genuine errors are reported.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
drivers/power/regulator/regulator-uclass.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c
index 12e141b..f3fe7a5 100644
--- a/drivers/power/regulator/regulator-uclass.c
+++ b/drivers/power/regulator/regulator-uclass.c
@@ -319,8 +319,10 @@ int regulators_enable_boot_on(bool verbose)
dev && !ret;
uclass_next_device(&dev)) {
ret = regulator_autoset(dev);
- if (ret == -EMEDIUMTYPE)
+ if (ret == -EMEDIUMTYPE) {
+ ret = 0;
continue;
+ }
if (verbose)
regulator_show(dev, ret);
}
--
2.4.3.573.g4eafbef
More information about the U-Boot
mailing list