Revert "regulator: core: Fix nested locking of supplies"

This reverts commit b1999fa6e8 which was
commit 70a7fb80e8 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>
This commit is contained in:
Greg Kroah-Hartman
2016-05-02 11:14:34 -07:00
committed by popcornmix
parent 7334f6bc41
commit b79f5eb98b

View File

@@ -132,14 +132,6 @@ static bool have_full_constraints(void)
return has_full_constraints || of_have_populated_dt(); 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 * regulator_lock_supply - lock a regulator and its supplies
* @rdev: regulator source * @rdev: regulator source
@@ -148,7 +140,7 @@ static void regulator_lock_supply(struct regulator_dev *rdev)
{ {
int i; 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); mutex_lock_nested(&rdev->mutex, i);
} }