Skip to content

Commit 1a5caec

Browse files
diandersbroonie
authored andcommitted
regulator: core: Stub devm_regulator_bulk_get_const() if !CONFIG_REGULATOR
When adding devm_regulator_bulk_get_const() I missed adding a stub for when CONFIG_REGULATOR is not enabled. Under certain conditions (like randconfig testing) this can cause the compiler to reports errors like: error: implicit declaration of function 'devm_regulator_bulk_get_const'; did you mean 'devm_regulator_bulk_get_enable'? Add the stub. Fixes: 1de452a ("regulator: core: Allow drivers to define their init data as const") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Cc: Neil Armstrong <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Link: https://patch.msgid.link/20240830073511.1.Ib733229a8a19fad8179213c05e1af01b51e42328@changeid Signed-off-by: Mark Brown <[email protected]>
1 parent 5be63fc commit 1a5caec

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

include/linux/regulator/consumer.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,14 @@ static inline int of_regulator_bulk_get_all(struct device *dev, struct device_no
452452
return 0;
453453
}
454454

455+
static inline int devm_regulator_bulk_get_const(
456+
struct device *dev, int num_consumers,
457+
const struct regulator_bulk_data *in_consumers,
458+
struct regulator_bulk_data **out_consumers)
459+
{
460+
return 0;
461+
}
462+
455463
static inline int regulator_bulk_enable(int num_consumers,
456464
struct regulator_bulk_data *consumers)
457465
{

0 commit comments

Comments
 (0)