A few functions in the new driver are global but only used in this file:
drivers/regulator/max77857-regulator.c:209:5: error: no previous prototype for 'max77859_get_voltage_sel' [-Werror=missing-prototypes]
drivers/regulator/max77857-regulator.c:221:5: error: no previous prototype for 'max77859_set_current_limit' [-Werror=missing-prototypes]
drivers/regulator/max77857-regulator.c:235:5: error: no previous prototype for 'max77859_get_current_limit' [-Werror=missing-prototypes]
Mark them static, which produces potentially better code and avoids the warning.
Fixes:
af71cccadeced ("regulator: max77857: Add ADI MAX77857/59/MAX77831 Regulator Support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230718193938.3593118-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
MAX77859_CONT3_DVS_START);
}
-int max77859_get_voltage_sel(struct regulator_dev *rdev)
+static int max77859_get_voltage_sel(struct regulator_dev *rdev)
{
__be16 reg;
int ret;
return FIELD_GET(MAX77859_VOLTAGE_SEL_MASK, __be16_to_cpu(reg));
}
-int max77859_set_current_limit(struct regulator_dev *rdev, int min_uA, int max_uA)
+static int max77859_set_current_limit(struct regulator_dev *rdev, int min_uA, int max_uA)
{
u32 selector;
return regmap_write(rdev->regmap, MAX77859_REG_CONT5, selector);
}
-int max77859_get_current_limit(struct regulator_dev *rdev)
+static int max77859_get_current_limit(struct regulator_dev *rdev)
{
u32 selector;
int ret;