Skip to contentSkip to conversation

reset: add stub for device_reset when CONFIG_RESET_CONTROLLER=n

PATCH Applied Ahmad Fatoum 2 participants 2 messages Feb 20, 2020 – Mar 2, 2020 Reset controller framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reset: add stub for device_reset when CONFIG_RESET_CONTROLLER=n

Users of an optional device_reset that have CONFIG_RESET_CONTROLLER=n will trigger compilation errors. Add a static inline stub to fix it.

[ Note: device_reset is unused and unusable because we have no reset
controller implementing .reset. It's available in Linux though and apparently useful for shared resets, so it's left in ]

---
 include/linux/reset.h | 6 ++++++
 1 file changed, 6 insertions(+)
include/linux/reset.h +6 -0
index a22bcf9a5d64..4a92a177bc75 100644
@@ -55,6 +55,12 @@ static inline int device_reset_us(struct device_d *dev, int us)
 	return 0;
 }
 
+static inline int device_reset(struct device_d *dev)
+{
+	WARN_ON(1);
+	return 0;
+}
+
 #endif /* CONFIG_RESET_CONTROLLER */
 
 #endif
Signature · 7 lines
2.20.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 11 lines · Ahmad Fatoum

Users of an optional device_reset that have CONFIG_RESET_CONTROLLER=n will trigger compilation errors. Add a static inline stub to fix it.

[ Note: device_reset is unused and unusable because we have no reset
controller implementing .reset. It's available in Linux though and apparently useful for shared resets, so it's left in ]

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

Applied, thanks

Sascha

Signature · 9 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 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox