summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorMatti Vaittinen <mazziesaccount@gmail.com>2024-04-23 14:38:28 +0300
committerMark Brown <broonie@kernel.org>2024-04-24 10:13:30 +0900
commitff33132605c1a0acea59e4c523cb7c6fabe856b2 (patch)
tree0e56df3e1d647d47edc6edbc3e55bd3179c4ddb8 /Documentation
parent96e20adc43c4f81e9163a5188cee75a6dd393e09 (diff)
downloadlinux-ff33132605c1a0acea59e4c523cb7c6fabe856b2.tar.gz
linux-ff33132605c1a0acea59e4c523cb7c6fabe856b2.tar.bz2
linux-ff33132605c1a0acea59e4c523cb7c6fabe856b2.zip
regulator: change devm_regulator_get_enable_optional() stub to return Ok
The devm_regulator_get_enable_optional() should be a 'call and forget' API, meaning, when it is used to enable the regulators, the API does not provide a handle to do any further control of the regulators. It gives no real benefit to return an error from the stub if CONFIG_REGULATOR is not set. On the contrary, returning an error is causing problems to drivers when hardware is such it works out just fine with no regulator control. Returning an error forces drivers to specifically handle the case where CONFIG_REGULATOR is not set, making the mere existence of the stub questionalble. Change the stub implementation for the devm_regulator_get_enable_optional() to return Ok so drivers do not separately handle the case where the CONFIG_REGULATOR is not set. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Fixes: da279e6965b3 ("regulator: Add devm helpers for get and enable") Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/ZiedtOE00Zozd3XO@fedora Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions