public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] reset: Add (devm_)reset_control_get stub functions
@ 2015-08-31 23:56 Axel Lin
  2015-09-01  8:04 ` Philipp Zabel
  0 siblings, 1 reply; 4+ messages in thread
From: Axel Lin @ 2015-08-31 23:56 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: Mark Brown, Takashi Iwai, linux-kernel

So the drivers can be compiled with CONFIG_RESET_CONTROLLER disabled.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
v2: Add __must_check and WARN_ON(1); And make it return ERR_PTR(-EINVAL).

 include/linux/reset.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/include/linux/reset.h b/include/linux/reset.h
index da5602b..7f65f9c 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -74,6 +74,20 @@ static inline int device_reset_optional(struct device *dev)
 	return -ENOSYS;
 }
 
+static inline struct reset_control *__must_check reset_control_get(
+					struct device *dev, const char *id)
+{
+	WARN_ON(1);
+	return ERR_PTR(-EINVAL);
+}
+
+static inline struct reset_control *__must_check devm_reset_control_get(
+					struct device *dev, const char *id)
+{
+	WARN_ON(1);
+	return ERR_PTR(-EINVAL);
+}
+
 static inline struct reset_control *reset_control_get_optional(
 					struct device *dev, const char *id)
 {
-- 
1.9.1




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

end of thread, other threads:[~2015-09-01 13:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-31 23:56 [PATCH v2] reset: Add (devm_)reset_control_get stub functions Axel Lin
2015-09-01  8:04 ` Philipp Zabel
2015-09-01 13:13   ` Mark Brown
2015-09-01 13:14     ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox