drivers/regulator/devres.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
The enum regulator_get_type has been available since 2017, so use that
enum instead of an "untyped" int in the three functions where "get_type"
is used.
No functional change intended.
Suggested-by: Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
drivers/regulator/devres.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/devres.c b/drivers/regulator/devres.c
index 2cf03042fddf..615deba5d22c 100644
--- a/drivers/regulator/devres.c
+++ b/drivers/regulator/devres.c
@@ -20,7 +20,7 @@ static void devm_regulator_release(struct device *dev, void *res)
}
static struct regulator *_devm_regulator_get(struct device *dev, const char *id,
- int get_type)
+ enum regulator_get_type get_type)
{
struct regulator **ptr, *regulator;
@@ -78,7 +78,7 @@ static void regulator_action_disable(void *d)
}
static int _devm_regulator_get_enable(struct device *dev, const char *id,
- int get_type)
+ enum regulator_get_type get_type)
{
struct regulator *r;
int ret;
@@ -751,7 +751,7 @@ EXPORT_SYMBOL_GPL(devm_regulator_irq_helper);
#if IS_ENABLED(CONFIG_OF)
static struct regulator *_devm_of_regulator_get(struct device *dev, struct device_node *node,
- const char *id, int get_type)
+ const char *id, enum regulator_get_type get_type)
{
struct regulator **ptr, *regulator;
---
base-commit: e77a5a5cfe43b4c25bd44a3818e487033287517f
change-id: 20260330-regulator-devres-type-2174f08710ce
Best regards,
--
Luca Weiss <luca.weiss@fairphone.com>
On Mon, 30 Mar 2026 16:14:13 +0200, Luca Weiss wrote:
> regulator: devres: Use enum regulator_get_type in internal functions
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-7.1
Thanks!
[1/1] regulator: devres: Use enum regulator_get_type in internal functions
https://git.kernel.org/broonie/regulator/c/5a623ef758d0
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
© 2016 - 2026 Red Hat, Inc.