Skip to content

Commit 51dfb6c

Browse files
digetxbroonie
authored andcommitted
regulator: consumer: Add missing stubs to regulator/consumer.h
Add missing stubs to regulator/consumer.h in order to fix COMPILE_TEST of the kernel. In particular this should fix compile-testing of OPP core because of a missing stub for regulator_sync_voltage(). Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20210120205844.12658-1-digetx@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 09db731 commit 51dfb6c

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

include/linux/regulator/consumer.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,12 @@ regulator_get_exclusive(struct device *dev, const char *id)
331331
return ERR_PTR(-ENODEV);
332332
}
333333

334+
static inline struct regulator *__must_check
335+
devm_regulator_get_exclusive(struct device *dev, const char *id)
336+
{
337+
return ERR_PTR(-ENODEV);
338+
}
339+
334340
static inline struct regulator *__must_check
335341
regulator_get_optional(struct device *dev, const char *id)
336342
{
@@ -486,6 +492,11 @@ static inline int regulator_get_voltage(struct regulator *regulator)
486492
return -EINVAL;
487493
}
488494

495+
static inline int regulator_sync_voltage(struct regulator *regulator)
496+
{
497+
return -EINVAL;
498+
}
499+
489500
static inline int regulator_is_supported_voltage(struct regulator *regulator,
490501
int min_uV, int max_uV)
491502
{
@@ -578,6 +589,25 @@ static inline int devm_regulator_unregister_notifier(struct regulator *regulator
578589
return 0;
579590
}
580591

592+
static inline int regulator_suspend_enable(struct regulator_dev *rdev,
593+
suspend_state_t state)
594+
{
595+
return -EINVAL;
596+
}
597+
598+
static inline int regulator_suspend_disable(struct regulator_dev *rdev,
599+
suspend_state_t state)
600+
{
601+
return -EINVAL;
602+
}
603+
604+
static inline int regulator_set_suspend_voltage(struct regulator *regulator,
605+
int min_uV, int max_uV,
606+
suspend_state_t state)
607+
{
608+
return -EINVAL;
609+
}
610+
581611
static inline void *regulator_get_drvdata(struct regulator *regulator)
582612
{
583613
return NULL;

0 commit comments

Comments
 (0)