[PATCH 2/8] regulator: core: Fix regulator_is_supported_voltage() kerneldoc return value
Chen-Yu Tsai
wenst at chromium.org
Tue Aug 27 02:55:42 PDT 2024
The kerneldoc for regulator_is_supported_voltage() states that the
return value is a boolean. That is not correct, as it could return an
error number if the check failed.
Fix the description by expanding it to cover the true, false and error
conditions. The description is also converted to a proper "Return"
section.
Fixes: c5f3939b8fe0 ("regulator: core: Support fixed voltages in regulator_is_supported_voltage()")
Signed-off-by: Chen-Yu Tsai <wenst at chromium.org>
---
drivers/regulator/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 763048d6f1ed..3a1b6fd9780d 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3456,7 +3456,8 @@ EXPORT_SYMBOL_GPL(regulator_get_linear_step);
* @min_uV: Minimum required voltage in uV.
* @max_uV: Maximum required voltage in uV.
*
- * Returns a boolean.
+ * Return: 1 if voltage range is support, 0 if not, or error number if
+ * voltage can't be changed and voltage readback failed.
*/
int regulator_is_supported_voltage(struct regulator *regulator,
int min_uV, int max_uV)
--
2.46.0.295.g3b9ea8a38a-goog
More information about the linux-arm-kernel
mailing list