mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
Revert "regulator: core: Fix nested locking of supplies"
This reverts commitb1999fa6e8which was commit70a7fb80e8upstream. 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:
committed by
popcornmix
parent
7334f6bc41
commit
b79f5eb98b
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user