[RFC PATCH 06/13] mux: Define a stub for mux_get_by_index if CONFIG_MUX is disabled

Sean Anderson seanga2 at gmail.com
Fri Feb 5 05:39:16 CET 2021


This allows code using mux_get_by_index to be agnostic about CONFIG_MUX.

Signed-off-by: Sean Anderson <seanga2 at gmail.com>
---

 include/mux.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/mux.h b/include/mux.h
index 91a89bbb9a..882a00068b 100644
--- a/include/mux.h
+++ b/include/mux.h
@@ -135,6 +135,12 @@ static inline int mux_control_deselect(struct mux_control *mux)
 	return -ENOSYS;
 }
 
+static inline int mux_get_by_index(struct udevice *dev, int index,
+				   struct mux_control **mux)
+{
+	return -ENOSYS;
+}
+
 static inline struct mux_control *mux_control_get(struct udevice *dev,
 						  const char *mux_name)
 {
-- 
2.29.2



More information about the U-Boot mailing list