linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER
@ 2015-12-01 15:34 Nishanth Menon
  2015-12-01 15:56 ` kbuild test robot
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Nishanth Menon @ 2015-12-01 15:34 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: Nishanth Menon, linux-omap, linux-kernel, linux-arm-kernel

When CONFIG_RESET_CONTROLLER is not defined (example COMPILE_TEST),
provide a dummy static inline implementation.

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 include/linux/reset-controller.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/linux/reset-controller.h b/include/linux/reset-controller.h
index ce6b962ffed4..4badecb2619e 100644
--- a/include/linux/reset-controller.h
+++ b/include/linux/reset-controller.h
@@ -48,7 +48,16 @@ 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
-- 
2.6.2.402.g2635c2b

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-12-01 20:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH V2] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER is not set Nishanth Menon
2015-12-01 20:20 ` [PATCH] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER kbuild test robot

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).