From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH v2] regulator: Add stub for devm_regulator_get_exclusive
Date: Tue, 12 Aug 2014 09:37:09 +0800 [thread overview]
Message-ID: <1407807429.8958.1.camel@phoenix> (raw)
Fix below build error when !CONFIG_REGULATOR.
CC drivers/gpu/drm/msm/hdmi/hdmi.o
drivers/gpu/drm/msm/hdmi/hdmi.c: In function 'hdmi_init':
drivers/gpu/drm/msm/hdmi/hdmi.c:126:3: error: implicit declaration of function 'devm_regulator_get_exclusive' [-Werror=implicit-function-declaration]
Also makes regulator_get_exclusive and devm_regulator_get_exclusive stub
functions return error pointer.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
include/linux/regulator/consumer.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index f8a8733..66473e3 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -262,7 +262,13 @@ devm_regulator_get(struct device *dev, const char *id)
static inline struct regulator *__must_check
regulator_get_exclusive(struct device *dev, const char *id)
{
- return NULL;
+ return ERR_PTR(-ENODEV);
+}
+
+static inline struct regulator *__must_check
+devm_regulator_get_exclusive(struct device *dev, const char *id)
+{
+ return ERR_PTR(-ENODEV);
}
static inline struct regulator *__must_check
--
1.9.1
next reply other threads:[~2014-08-12 1:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-12 1:37 Axel Lin [this message]
2014-08-12 21:55 ` [PATCH v2] regulator: Add stub for devm_regulator_get_exclusive Mark Brown
2014-08-16 13:30 ` Axel Lin
2014-08-16 22:00 ` Mark Brown
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=1407807429.8958.1.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.