regulator: Fix for v6.9
One fix that came in during the merge window, fixing a problem with bootstrapping the state of exclusive regulators which have a parent regulator. -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmX9kqoACgkQJNaLcl1U h9BzzAf+M6O+WUIbcNj84x+dz13IOdNolkb5kGjVJLY+yh5HGEnmRRLZVj4TF+pO 4L+EJa7pKY9a6YpODy/pDpyzdQgYbdsLj88/G4ug0p2FMaQqpl1GEpYyEfaNtVW8 6BlQlw4L/429k2FVble/0zDyzJjpvQsGwk8qAmHcA3mUJSY+BMqlpeU9t6zMXR7l yYH+mVgqAx2sY8z20CWvZDRgqOVBrrE1IZ8RKuW5Xm0/cWGY0ihj6uy4Z3zFuq9I pjAZ++FSBmNRj1XDNm8UqRdjVtCTIuaCNJZ0ayqEGxDb3yNAVpjpVKURELBA17CR fCw3+3Yyj1d+5hb8mrXeKrC2Ro5WVQ== =vvdo -----END PGP SIGNATURE----- Merge tag 'regulator-fix-v6.9-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fix from Mark Brown: "One fix that came in during the merge window, fixing a problem with bootstrapping the state of exclusive regulators which have a parent regulator" * tag 'regulator-fix-v6.9-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: core: Propagate the regulator state in case of exclusive get
This commit is contained in:
commit
8c826bd99a
@ -2274,6 +2274,17 @@ struct regulator *_regulator_get(struct device *dev, const char *id,
|
|||||||
if (ret > 0) {
|
if (ret > 0) {
|
||||||
rdev->use_count = 1;
|
rdev->use_count = 1;
|
||||||
regulator->enable_count = 1;
|
regulator->enable_count = 1;
|
||||||
|
|
||||||
|
/* Propagate the regulator state to its supply */
|
||||||
|
if (rdev->supply) {
|
||||||
|
ret = regulator_enable(rdev->supply);
|
||||||
|
if (ret < 0) {
|
||||||
|
destroy_regulator(regulator);
|
||||||
|
module_put(rdev->owner);
|
||||||
|
put_device(&rdev->dev);
|
||||||
|
return ERR_PTR(ret);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
rdev->use_count = 0;
|
rdev->use_count = 0;
|
||||||
regulator->enable_count = 0;
|
regulator->enable_count = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user