Skip to contentSkip to conversation

ARM: omap2+: mux: Allow board mux settings to be NULL

PATCH New Colin Cross 1 participant 1 message May 31, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: omap2+: mux: Allow board mux settings to be NULL

OMAP4 has two mux instances, and the board may not have settings for one of them. Allow the board file to pass NULL for an instance's mux settings, which will initialize the mux instance but skip writing board settings.

---
 arch/arm/mach-omap2/mux.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/mux.c +3 -0
index a4ab1e3..6788dbc 100644
@@ -83,6 +83,9 @@ void omap_mux_write(struct omap_mux_partition *partition, u16 val,
 void omap_mux_write_array(struct omap_mux_partition *partition,
 				 struct omap_board_mux *board_mux)
 {
+	if (!board_mux)
+		return;
+
 	while (board_mux->reg_offset != OMAP_MUX_TERMINATOR) {
 		omap_mux_write(partition, board_mux->value,
 			       board_mux->reg_offset);
Signature · 1 line
1.7.4.1