linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Suzuki K. Poulose" <suzuki.poulose@arm.com>
To: broonie@kernel.org
Cc: linux-kernel@vger.kernel.org, sfr@canb.auug.org.au,
	linux-next@vger.kernel.org,
	"Suzuki K. Poulose" <suzuki.poulose@arm.com>,
	treding@nvidia.com, paul@pwsan.com
Subject: [PATCHv2] regulators: Add missing dummy definition for regulator_list_voltage
Date: Fri, 10 Jul 2015 16:26:38 +0100	[thread overview]
Message-ID: <1436541998-19930-1-git-send-email-suzuki.poulose@arm.com> (raw)

From: "Suzuki K. Poulose" <suzuki.poulose@arm.com>

Fixes a build break when CONFIG_REGULATOR is not selected.

e.g, on linux-next - 07102015:

drivers/clk/tegra/clk-dfll.c: In function ‘find_lut_index_for_rate’:
drivers/clk/tegra/clk-dfll.c:691:3: error: implicit declaration of function ‘regulator_list_voltage’ [-Werror=implicit-function-declaration]
    if (regulator_list_voltage(td->vdd_reg, td->i2c_lut[i]) == uv)
    ^
   CC      drivers/clocksource/mmio.o
   CC      fs/proc/softirqs.o
cc1: some warnings being treated as errors
make[3]: *** [drivers/clk/tegra/clk-dfll.o] Error 1
make[2]: *** [drivers/clk/tegra] Error 2
make[1]: *** [drivers/clk] Error 2
make[1]: *** Waiting for unfinished jobs....

This should be pushed to 4.2 as we have the issue in 4.2-rc1, just that
nobody uses it without the REGULATOR(yet).

Cc: Mark Brown <broonie@kernel.org>
Cc: treding@nvidia.com
Cc: paul@pwsan.com
Signed-off-by: Suzuki K. Poulose <suzuki.poulose@arm.com>
---
Changes since V1:
 - Return -EINVAL instead of 0
---
 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 f8a689e..2ba4a40 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -550,6 +550,12 @@ static inline int regulator_count_voltages(struct regulator *regulator)
 {
 	return 0;
 }
+
+static inline int regulator_list_voltage(struct regulator *regulator, unsigned selector)
+{
+	return -EINVAL;
+}
+
 #endif
 
 static inline int regulator_set_voltage_tol(struct regulator *regulator,
-- 
1.7.9.5


                 reply	other threads:[~2015-07-10 15:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1436541998-19930-1-git-send-email-suzuki.poulose@arm.com \
    --to=suzuki.poulose@arm.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=sfr@canb.auug.org.au \
    --cc=treding@nvidia.com \
    /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).