Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1281029
| From | Nishanth Menon <nm@ti.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH V2] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER is not set |
| Date | 2015-12-01 17:40 +0100 |
| Message-ID | <qAW8a-3BH-15@gated-at.bofh.it> (permalink) |
| References | <qAVc6-30Q-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER Nishanth Menon <nm@ti.com> - 2015-12-01 16:40 +0100
Re: [PATCH] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER kbuild test robot <lkp@intel.com> - 2015-12-01 17:00 +0100
Re: [PATCH] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER Nishanth Menon <menon.nishanth@gmail.com> - 2015-12-01 17:10 +0100
[PATCH V2] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER is not set Nishanth Menon <nm@ti.com> - 2015-12-01 17:40 +0100
Re: [PATCH] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER kbuild test robot <lkp@intel.com> - 2015-12-01 21:20 +0100
csiph-web