From: Nishanth Menon <nm@ti.com>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, Nishanth Menon <nm@ti.com>
Subject: [PATCH V2] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER is not set
Date: Tue, 1 Dec 2015 10:38:33 -0600 [thread overview]
Message-ID: <1448987913-17770-1-git-send-email-nm@ti.com> (raw)
In-Reply-To: <1448984088-31904-1-git-send-email-nm@ti.com>
When CONFIG_RESET_CONTROLLER is not defined (example COMPILE_TEST),
provide a dummy static inline implementation.
Signed-off-by: Nishanth Menon <nm@ti.com>
---
V2: Thanks to kbot, I realized i messed up the patch -> hopefully, this revision
has better luck.
V1: https://patchwork.kernel.org/patch/7738191/
include/linux/reset-controller.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/include/linux/reset-controller.h b/include/linux/reset-controller.h
index ce6b962ffed4..e294565540db 100644
--- a/include/linux/reset-controller.h
+++ b/include/linux/reset-controller.h
@@ -48,7 +48,18 @@ struct reset_controller_dev {
unsigned int nr_resets;
};
+#if IS_ENABLED(CONFIG_RESET_CONTROLLER)
int reset_controller_register(struct reset_controller_dev *rcdev);
void reset_controller_unregister(struct reset_controller_dev *rcdev);
+#else
+static inline int reset_controller_register(struct reset_controller_dev *r)
+{
+ return -EINVAL;
+}
+
+static inline void reset_controller_unregister(struct reset_controller_dev *r)
+{
+}
+#endif /* IS_ENABLED(CONFIG_RESET_CONTROLLER) */
#endif
--
2.6.2.402.g2635c2b
next prev parent reply other threads:[~2015-12-01 16:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-01 15:34 [PATCH] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER Nishanth Menon
2015-12-01 15:56 ` kbuild test robot
2015-12-01 16:07 ` Nishanth Menon
2015-12-01 16:38 ` Nishanth Menon [this message]
2015-12-01 20:20 ` kbuild test robot
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=1448987913-17770-1-git-send-email-nm@ti.com \
--to=nm@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
/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).