Skip to contentSkip to conversation

reset: Add (devm_)reset_control_get stub functions

PATCH Applied Axel Lin 4 participants 4 messages Aug 31, 2015 – Sep 1, 2015 Reset controller framework

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH v2 1/1 reset: Add (devm_)reset_control_get stub functions

So the drivers can be compiled with CONFIG_RESET_CONTROLLER disabled.

---
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(+)
include/linux/reset.h +14 -0
index da5602b..7f65f9c 100644
@@ -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)
 {
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw

Am Dienstag, den 01.09.2015, 07:56 +0800 schrieb Axel Lin:

Quoted 3 lines

So the drivers can be compiled with CONFIG_RESET_CONTROLLER disabled.

Applied, thanks.

regards
Philipp

#2 lore raw
Quoted 6 lines · Philipp Zabel

Am Dienstag, den 01.09.2015, 07:56 +0800 schrieb Axel Lin:

Quoted 3 lines

So the drivers can be compiled with CONFIG_RESET_CONTROLLER disabled.

Applied, thanks.

Takashi, this should be enough for the build error in ASoC to be fixed by the time -rc1 comes out I expect. Thanks Axel & Philipp.

#3 lore raw
Quoted 11 lines · Mark Brown
Quoted 6 lines · Philipp Zabel

Am Dienstag, den 01.09.2015, 07:56 +0800 schrieb Axel Lin:

Quoted 3 lines

So the drivers can be compiled with CONFIG_RESET_CONTROLLER disabled.

Applied, thanks.

Takashi, this should be enough for the build error in ASoC to be fixed by the time -rc1 comes out I expect. Thanks Axel & Philipp.

Yep, I'm going to send a pull request tomorrow :)

Takashi