Skip to content

Commit

Permalink
regulators: Add definition of regulator_set_voltage_time() for !CONFI…
Browse files Browse the repository at this point in the history
…G_REGULATOR

We already have dummy implementation for most of the regulators APIs for
!CONFIG_REGULATOR case and were missing it for regulator_set_voltage_time().

Found this issue while compiling cpufreq-cpu0 driver without regulators support
in kernel.

drivers/cpufreq/cpufreq-cpu0.c: In function ‘cpu0_cpufreq_probe’:
drivers/cpufreq/cpufreq-cpu0.c:186:3: error: implicit declaration of function ‘regulator_set_voltage_time’ [-Werror=implicit-function-declaration]

Fix this by adding dummy definition for regulator_set_voltage_time().

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Viresh Kumar authored and Mark Brown committed May 28, 2014
1 parent c9eaa44 commit d660e92
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/linux/regulator/consumer.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,12 @@ static inline int regulator_set_voltage(struct regulator *regulator,
return 0;
}

static inline int regulator_set_voltage_time(struct regulator *regulator,
int old_uV, int new_uV)
{
return 0;
}

static inline int regulator_get_voltage(struct regulator *regulator)
{
return -EINVAL;
Expand Down

0 comments on commit d660e92

Please sign in to comment.