Skip to contentSkip to conversation

reset: add missing stub for of_reset_control_get()

PATCH Applied Denis Orlov 3 participants 3 messages Oct 31, 2022 – Nov 2, 2022 Reset controller framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reset: add missing stub for of_reset_control_get()

Every other function in reset.h has a corresponding stub that is used when the option RESET_CONTROLLER is disabled in config. This allows for code that uses this function to still be compilable even when the reset controller subsystem is disabled.

---
 include/linux/reset.h | 6 ++++++
 1 file changed, 6 insertions(+)
include/linux/reset.h +6 -0
index c1282a84c7..2d788547f4 100644
@@ -48,6 +48,12 @@ static inline int reset_control_deassert(struct reset_control *rstc)
 	return 0;
 }
 
+static inline struct reset_control *
+of_reset_control_get(struct device_node *node, const char *id)
+{
+	return NULL;
+}
+
 static inline struct reset_control *
 reset_control_get(struct device_d *dev, const char *id)
 {
Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Denis Orlov

Every other function in reset.h has a corresponding stub that is used when the option RESET_CONTROLLER is disabled in config. This allows for code that uses this function to still be compilable even when the reset controller subsystem is disabled.

Quoted 21 lines
---
 include/linux/reset.h | 6 ++++++
 1 file changed, 6 insertions(+)
include/linux/reset.h +6 -0
index c1282a84c7..2d788547f4 100644
@@ -48,6 +48,12 @@ static inline int reset_control_deassert(struct reset_control *rstc)
 	return 0;
 }
 
+static inline struct reset_control *
+of_reset_control_get(struct device_node *node, const char *id)
+{
+	return NULL;
+}
+
 static inline struct reset_control *
 reset_control_get(struct device_d *dev, const char *id)
 {
Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
Applied
#2 lore raw
In reply to Denis Orlov
Quoted 9 lines · Denis Orlov

Every other function in reset.h has a corresponding stub that is used when the option RESET_CONTROLLER is disabled in config. This allows for code that uses this function to still be compilable even when the reset controller subsystem is disabled.

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

Applied, thanks

Sascha

Quoted 22 lines
include/linux/reset.h +6 -0
index c1282a84c7..2d788547f4 100644
@@ -48,6 +48,12 @@ static inline int reset_control_deassert(struct reset_control *rstc)
 	return 0;
 }
 
+static inline struct reset_control *
+of_reset_control_get(struct device_node *node, const char *id)
+{
+	return NULL;
+}
+
 static inline struct reset_control *
 reset_control_get(struct device_d *dev, const char *id)
 {
Signature · 1 line
2.30.2
Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |