Commit 34af67eb authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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

This reverts commit b1999fa6 which was
commit 70a7fb80 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: default avatarGuenter 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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 19a4e46b
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment