Unverified Commit 811c732f authored by Mark Brown's avatar Mark Brown
Browse files

Merge branch 'for-5.10' of...

Merge branch 'for-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-5.11
parents 51c0a0c6 c088a498
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -4165,6 +4165,8 @@ int regulator_get_voltage_rdev(struct regulator_dev *rdev)
		ret = rdev->desc->fixed_uV;
	} else if (rdev->supply) {
		ret = regulator_get_voltage_rdev(rdev->supply->rdev);
	} else if (rdev->supply_name) {
		return -EPROBE_DEFER;
	} else {
		return -EINVAL;
	}
@@ -5841,13 +5843,14 @@ static int regulator_late_cleanup(struct device *dev, void *data)
	if (rdev->use_count)
		goto unlock;

	/* If we can't read the status assume it's on. */
	/* If we can't read the status assume it's always on. */
	if (ops->is_enabled)
		enabled = ops->is_enabled(rdev);
	else
		enabled = 1;

	if (!enabled)
	/* But if reading the status failed, assume that it's off. */
	if (enabled <= 0)
		goto unlock;

	if (have_full_constraints()) {