Skip to content

Commit 0c2d0ff

Browse files
charleskeepaxLee Jones
authored andcommitted
mfd: arizona: Add comment to explain non-devm regulator_get
To avoid someone attempting to change this regulator_get back into a devm_regulator_get put a comment in explaining that devres can't be used here as the regulator will be destroyed before devres calls regulator_put. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
1 parent f18ac1a commit 0c2d0ff

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎drivers/mfd/arizona-core.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,12 @@ int arizona_dev_init(struct arizona *arizona)
683683
goto err_early;
684684
}
685685

686+
/**
687+
* Don't use devres here because the only device we have to get
688+
* against is the MFD device and DCVDD will likely be supplied by
689+
* one of its children. Meaning that the regulator will be
690+
* destroyed by the time devres calls regulator put.
691+
*/
686692
arizona->dcvdd = regulator_get(arizona->dev, "DCVDD");
687693
if (IS_ERR(arizona->dcvdd)) {
688694
ret = PTR_ERR(arizona->dcvdd);

0 commit comments

Comments
 (0)