From: Viresh Kumar <viresh.kumar@linaro.org>
To: rjw@rjwysocki.net
Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, arvind.chauhan@arm.com,
edubezval@gmail.com, pavel@ucw.cz, lgirdwood@gmail.com,
broonie@kernel.org, Viresh Kumar <viresh.kumar@linaro.org>
Subject: [PATCH V2 2/3] regulators: Add definition of regulator_set_voltage_time() for !CONFIG_REGULATOR
Date: Mon, 2 Jun 2014 12:59:24 +0530 [thread overview]
Message-ID: <bc48fa7971f874d77a304e86a72ff5cee6f29e7c.1401693980.git.viresh.kumar@linaro.org> (raw)
In-Reply-To: <788accde56086078d69d3eba0d913114315de43a.1401693980.git.viresh.kumar@linaro.org>
In-Reply-To: <788accde56086078d69d3eba0d913114315de43a.1401693980.git.viresh.kumar@linaro.org>
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>
---
V1->V2: return -EINVAL instead of zero.
include/linux/regulator/consumer.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 28fa089..7563f8b 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -397,6 +397,12 @@ static inline int regulator_set_voltage(struct regulator *regulator,
return -EINVAL;
}
+static inline int regulator_set_voltage_time(struct regulator *regulator,
+ int old_uV, int new_uV)
+{
+ return -EINVAL;
+}
+
static inline int regulator_get_voltage(struct regulator *regulator)
{
return -EINVAL;
--
2.0.0.rc2
next prev parent reply other threads:[~2014-06-02 7:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-02 7:29 [PATCH V2 1/3] regulator: return -EINVAL from regulator_set_voltage() for !CONFIG_REGULATOR Viresh Kumar
2014-06-02 7:29 ` Viresh Kumar [this message]
2014-06-02 7:29 ` [PATCH V2 3/3] cpufreq: cpufreq-cpu0: remove dependency on THERMAL and REGULATOR Viresh Kumar
2014-06-02 12:15 ` [PATCH V2 1/3] regulator: return -EINVAL from regulator_set_voltage() for !CONFIG_REGULATOR Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bc48fa7971f874d77a304e86a72ff5cee6f29e7c.1401693980.git.viresh.kumar@linaro.org \
--to=viresh.kumar@linaro.org \
--cc=arvind.chauhan@arm.com \
--cc=broonie@kernel.org \
--cc=edubezval@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).