mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 21:58:04 +00:00
ac4b9dbb3c
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu> SVN-Revision: 39782
30 lines
1.0 KiB
Diff
30 lines
1.0 KiB
Diff
From 820a121fdef79cc1293e6fee2fbe8156d9e8a75a Mon Sep 17 00:00:00 2001
|
|
From: Hans de Goede <hdegoede@redhat.com>
|
|
Date: Wed, 11 Dec 2013 15:07:52 +0100
|
|
Subject: [PATCH] regulator_get_optional: don't print an error when no
|
|
regulator is found
|
|
|
|
Only print an error when _regulator_get() is expected to return a valid
|
|
regulator, that is when _regulator_get() is called from regulator_get() and
|
|
we're not using the dummy because we don't have full-constraints, or when
|
|
_regulator_get() is called from regulator_get_exclusive() in which case
|
|
returning a dummy is not allowed.
|
|
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
---
|
|
drivers/regulator/core.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/regulator/core.c
|
|
+++ b/drivers/regulator/core.c
|
|
@@ -1351,7 +1351,8 @@ static struct regulator *_regulator_get(
|
|
|
|
rdev = dummy_regulator_rdev;
|
|
goto found;
|
|
- } else {
|
|
+ /* Don't log an error when called from regulator_get_optional() */
|
|
+ } else if (!have_full_constraints() || exclusive) {
|
|
dev_err(dev, "dummy supplies not allowed\n");
|
|
}
|
|
|