]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
regulator: core: Allow dummy regulators for supplies
authorMark Brown <broonie@kernel.org>
Tue, 11 Apr 2017 20:31:40 +0000 (21:31 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 14 Apr 2017 17:08:01 +0000 (18:08 +0100)
Rather than just not resolving the supply when there is explicitly no
supply mapping fall through and allow a dummy supply to be substituted.
This fixes issues with constant retries reported by Dong Aisheng.

Signed-off-by: Mark Brown <broonie@kernel.org>
Tested-by: Dong Aisheng <aisheng.dong@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
drivers/regulator/core.c

index 3f424ec4fc56cd979626cda1bf1058d91dbc00ce..462e6e679ce1db4131c929db00512a979eef6232 100644 (file)
@@ -1532,14 +1532,6 @@ static int regulator_resolve_supply(struct regulator_dev *rdev)
        if (IS_ERR(r)) {
                ret = PTR_ERR(r);
 
-               if (ret == -ENODEV) {
-                       /*
-                        * No supply was specified for this regulator and
-                        * there will never be one.
-                        */
-                       return 0;
-               }
-
                /* Did the lookup explicitly defer for us? */
                if (ret == -EPROBE_DEFER)
                        return ret;