Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ad4b051 authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branch 'regulator/fix/core' into regulator-linus

parents 16830985 fa731ac7
Loading
Loading
Loading
Loading
+3 −11
Original line number Diff line number Diff line
@@ -138,18 +138,10 @@ static bool have_full_constraints(void)
 */
static void regulator_lock_supply(struct regulator_dev *rdev)
{
	struct regulator *supply;
	int i = 0;

	while (1) {
		mutex_lock_nested(&rdev->mutex, i++);
		supply = rdev->supply;

		if (!rdev->supply)
			return;
	int i;

		rdev = supply->rdev;
	}
	for (i = 0; rdev->supply; rdev = rdev->supply->rdev, i++)
		mutex_lock_nested(&rdev->mutex, i);
}

/**