diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-05-02 11:14:34 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-05-04 14:48:50 -0700 |
commit | 34af67eb941ae5371110c9adbd5392c7a3aa841e (patch) | |
tree | c568ed4f3d1f54669af1e5f194f0d478902e50ba /drivers/regulator | |
parent | 19a4e46b4513bab7d6b368175be2e24ad4665e5a (diff) |
Revert "regulator: core: Fix nested locking of supplies"
This reverts commit b1999fa6e8145305a6c8bda30ea20783717708e6 which was
commit 70a7fb80e85ae7f78f8e90cec3fbd862ea6a4d4b upstream.
It causes run-time breakage in the 4.4-stable tree and more patches are
needed to be applied first before this one in order to resolve the
issue.
Reported-by: Guenter Roeck <linux@roeck-us.net>
Cc: Mark Brown <broonie@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Thierry Reding <treding@nvidia.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/core.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 7b94b8ee087c..c70017d5f74b 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -132,14 +132,6 @@ static bool have_full_constraints(void) return has_full_constraints || of_have_populated_dt(); } -static inline struct regulator_dev *rdev_get_supply(struct regulator_dev *rdev) -{ - if (rdev && rdev->supply) - return rdev->supply->rdev; - - return NULL; -} - /** * regulator_lock_supply - lock a regulator and its supplies * @rdev: regulator source @@ -148,7 +140,7 @@ static void regulator_lock_supply(struct regulator_dev *rdev) { int i; - for (i = 0; rdev->supply; rdev = rdev_get_supply(rdev), i++) + for (i = 0; rdev->supply; rdev = rdev->supply->rdev, i++) mutex_lock_nested(&rdev->mutex, i); } |