Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Charles Keepax and committed by
Lee Jones
0c2d0ffb f18ac1a3

+6
+6
drivers/mfd/arizona-core.c
··· 683 683 goto err_early; 684 684 } 685 685 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 + */ 686 692 arizona->dcvdd = regulator_get(arizona->dev, "DCVDD"); 687 693 if (IS_ERR(arizona->dcvdd)) { 688 694 ret = PTR_ERR(arizona->dcvdd);