Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 1de452a0edda ("regulator: core: Allow drivers to define their init data as const")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202408301813.TesFuSbh-lkp@intel.com/
Cc: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patch.msgid.link/20240830073511.1.Ib733229a8a19fad8179213c05e1af01b51e42328@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Douglas Anderson and committed by
Mark Brown
1a5caec7 5be63fc1

+8
+8
include/linux/regulator/consumer.h
··· 452 452 return 0; 453 453 } 454 454 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 + 455 463 static inline int regulator_bulk_enable(int num_consumers, 456 464 struct regulator_bulk_data *consumers) 457 465 {