Skip to contentSkip to conversation

reset: stub out devm_reset_control_get()

PATCH In review Felipe Balbi 2 participants 3 messages May 13, 2014 Reset controller framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reset: stub out devm_reset_control_get()

without that stub, drivers will fail to build
when CONFIG_RESET_CONTROLLER=n.

---
 include/linux/reset.h | 6 ++++++
 1 file changed, 6 insertions(+)
include/linux/reset.h +6 -0
index c0eda50..aa94420 100644
@@ -75,6 +75,12 @@ static inline struct reset_control *devm_reset_control_get_optional(
 	return ERR_PTR(-ENOSYS);
 }
 
+static inline struct reset_control *devm_reset_control_get(
+					struct device *dev, const char *id)
+{
+	return ERR_PTR(-ENOSYS);
+}
+
 #endif /* CONFIG_RESET_CONTROLLER */
 
 #endif
Signature · 1 line
2.0.0.rc1
#1 lore raw
Quoted 13 lines · Felipe Balbi

without that stub, drivers will fail to build
when CONFIG_RESET_CONTROLLER=n.

---
 include/linux/reset.h | 6 ++++++
 1 file changed, 6 insertions(+)
include/linux/reset.h +0 -0
index c0eda50..aa94420 100644

include/linux/reset.h static inline struct reset_control *devm_reset_control_get_optional( · line 83

Quoted 9 lines
include/linux/reset.h +6 -0
@@ -75,6 +75,12 @@ static inline struct reset_control *devm_reset_control_get_optional(
 	return ERR_PTR(-ENOSYS);
 }
 
+static inline struct reset_control *devm_reset_control_get(
+					struct device *dev, const char *id)
+{
+	return ERR_PTR(-ENOSYS);
+}
+

reset_control_get should only be used in cases where the reset controller is mandatory for the driver to work, and hence, this driver should select or depend on CONFIG_RESET_CONTROLLER

If the reset controller is optional, reset_control_get_optional should be preferred, that is stubed out.

Maxime

Signature · 3 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw
Quoted 28 lines · Maxime Ripard
Quoted 13 lines · Felipe Balbi

without that stub, drivers will fail to build
when CONFIG_RESET_CONTROLLER=n.

---
 include/linux/reset.h | 6 ++++++
 1 file changed, 6 insertions(+)
include/linux/reset.h +0 -0
index c0eda50..aa94420 100644

include/linux/reset.h static inline struct reset_control *devm_reset_control_get_optional( · line 83

Quoted 9 lines
include/linux/reset.h +6 -0
@@ -75,6 +75,12 @@ static inline struct reset_control *devm_reset_control_get_optional(
 	return ERR_PTR(-ENOSYS);
 }
 
+static inline struct reset_control *devm_reset_control_get(
+					struct device *dev, const char *id)
+{
+	return ERR_PTR(-ENOSYS);
+}
+

reset_control_get should only be used in cases where the reset controller is mandatory for the driver to work, and hence, this driver should select or depend on CONFIG_RESET_CONTROLLER

Quoted 2 lines

If the reset controller is optional, reset_control_get_optional should be preferred, that is stubed out.

fair enough, depends on it is

Signature · 1 line
balbi