kernel: add missing config symbols to 3.13
[openwrt.git] / target / linux / sunxi / patches-3.13 / 126-regulator-dont-print-error-when-no-regulator-found.patch
1 From 820a121fdef79cc1293e6fee2fbe8156d9e8a75a Mon Sep 17 00:00:00 2001
2 From: Hans de Goede <hdegoede@redhat.com>
3 Date: Wed, 11 Dec 2013 15:07:52 +0100
4 Subject: [PATCH] regulator_get_optional: don't print an error when no
5  regulator is found
6
7 Only print an error when _regulator_get() is expected to return a valid
8 regulator, that is when _regulator_get() is called from regulator_get() and
9 we're not using the dummy because we don't have full-constraints, or when
10 _regulator_get() is called from regulator_get_exclusive() in which case
11 returning a dummy is not allowed.
12
13 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
14 ---
15  drivers/regulator/core.c | 3 ++-
16  1 file changed, 2 insertions(+), 1 deletion(-)
17
18 --- a/drivers/regulator/core.c
19 +++ b/drivers/regulator/core.c
20 @@ -1351,7 +1351,8 @@ static struct regulator *_regulator_get(
21  
22                 rdev = dummy_regulator_rdev;
23                 goto found;
24 -       } else {
25 +       /* Don't log an error when called from regulator_get_optional() */
26 +       } else if (!have_full_constraints() || exclusive) {
27                 dev_err(dev, "dummy supplies not allowed\n");
28         }
29