[PATCH] reset: add stub for device_reset when CONFIG_RESET_CONTROLLER=n

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 ]

Signed-off-by: Ahmad Fatoum <ahmad@xxxxxx>
---
 include/linux/reset.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/reset.h b/include/linux/reset.h
index a22bcf9a5d64..4a92a177bc75 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -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
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux