Merge remote-tracking branch 'regulator/fix/core' into regulator-linus
authorMark Brown <broonie@linaro.org>
Sun, 23 Feb 2014 03:22:18 +0000 (12:22 +0900)
committerMark Brown <broonie@linaro.org>
Sun, 23 Feb 2014 03:22:18 +0000 (12:22 +0900)
1  2 
drivers/regulator/core.c

diff --combined drivers/regulator/core.c
index 16a309e5c024ed45b4276d13d1f8e14c2c0a131c,74e9fb2e52e7c5bd7d45fcedbd3ed3c30ae247fe..d1ac4caaf1b05d4b68dd4bd986355dc59263c6fd
@@@ -1272,8 -1272,6 +1272,8 @@@ static struct regulator_dev *regulator_
                                if (r->dev.parent &&
                                        node == r->dev.of_node)
                                        return r;
 +                      *ret = -EPROBE_DEFER;
 +                      return NULL;
                } else {
                        /*
                         * If we couldn't even get the node then it's
@@@ -1314,7 -1312,7 +1314,7 @@@ static struct regulator *_regulator_get
        struct regulator_dev *rdev;
        struct regulator *regulator = ERR_PTR(-EPROBE_DEFER);
        const char *devname = NULL;
 -      int ret = -EPROBE_DEFER;
 +      int ret;
  
        if (id == NULL) {
                pr_err("get() with no identifier\n");
        if (dev)
                devname = dev_name(dev);
  
 +      if (have_full_constraints())
 +              ret = -ENODEV;
 +      else
 +              ret = -EPROBE_DEFER;
 +
        mutex_lock(&regulator_list_mutex);
  
        rdev = regulator_dev_lookup(dev, id, &ret);
                goto found;
        /* 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");
+               dev_warn(dev, "dummy supplies not allowed\n");
        }
  
        mutex_unlock(&regulator_list_mutex);