Merge tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Apr 2012 17:09:30 +0000 (10:09 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Apr 2012 17:09:30 +0000 (10:09 -0700)
Pull regulator fixes from Mark Brown:
 "A bunch of smallish fixes that came up during the merge window as
  things got more testing - even more fixes from Axel, a fix for error
  handling in more complex systems using -EPROBE_DEFER and a couple of
  small fixes for the new dummy regulators."

* tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: Remove non-existent parameter from fixed-helper.c kernel doc
  regulator: Fix setting new voltage in s5m8767_set_voltage
  regulator: fix sysfs name collision between dummy and fixed dummy regulator
  regulator: Fix deadlock on removal of regulators with supplies
  regulator: Fix comments in include/linux/regulator/machine.h
  regulator: Only update [LDOx|DCx]_HIB_MODE bits in wm8350_[ldo|dcdc]_set_suspend_disable
  regulator: Fix setting low power mode for wm831x aldo
  regulator: Return microamps in wm8350_isink_get_current
  regulator: wm8350: Fix the logic to choose best current limit setting
  regulator: wm831x-isink: Fix the logic to choose best current limit setting
  regulator: wm831x-dcdc: Fix the logic to choose best current limit setting
  regulator: anatop: patching to device-tree property "reg".
  regulator: Do proper shift to set correct bit for DC[2|5]_HIB_MODE setting
  regulator: Fix restoring pmic.dcdcx_hib_mode settings in wm8350_dcdc_set_suspend_enable
  regulator: Fix unbalanced lock/unlock in mc13892_regulator_probe error path
  regulator: Fix set and get current limit for wm831x_buckv
  regulator: tps6586x: Fix list minimal voltage setting for LDO0

1  2 
drivers/regulator/core.c

diff --combined drivers/regulator/core.c
index c056abd7562a29b91666083371d888a698b85eef,4a5054ef94214edf90709f8e6d8736555e6d1b55..e70dd382a009a2db05d78087b6e0e588584e6b6e
@@@ -1198,7 -1198,7 +1198,7 @@@ static struct regulator *_regulator_get
  {
        struct regulator_dev *rdev;
        struct regulator_map *map;
 -      struct regulator *regulator = ERR_PTR(-ENODEV);
 +      struct regulator *regulator = ERR_PTR(-EPROBE_DEFER);
        const char *devname = NULL;
        int ret;
  
@@@ -2926,7 -2926,7 +2926,7 @@@ struct regulator_dev *regulator_registe
  
                if (!r) {
                        dev_err(dev, "Failed to find supply %s\n", supply);
 -                      ret = -ENODEV;
 +                      ret = -EPROBE_DEFER;
                        goto scrub;
                }
  
@@@ -2992,14 -2992,14 +2992,14 @@@ void regulator_unregister(struct regula
        if (rdev == NULL)
                return;
  
+       if (rdev->supply)
+               regulator_put(rdev->supply);
        mutex_lock(&regulator_list_mutex);
        debugfs_remove_recursive(rdev->debugfs);
        flush_work_sync(&rdev->disable_work.work);
        WARN_ON(rdev->open_count);
        unset_regulator_supplies(rdev);
        list_del(&rdev->list);
-       if (rdev->supply)
-               regulator_put(rdev->supply);
        kfree(rdev->constraints);
        device_unregister(&rdev->dev);
        mutex_unlock(&regulator_list_mutex);