aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/mux.c
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2011-05-31 12:00:09 -0700
committerTony Lindgren <tony@atomide.com>2011-06-01 02:25:04 -0700
commitd4ff6121b44081601206980cafcd6ed3ecb367b6 (patch)
treea16b0f82954e8eb37792dcf3065afbddecb39a78 /arch/arm/mach-omap2/mux.c
parentOMAP4: fix return value of omap4_l3_init (diff)
downloadlinux-dev-d4ff6121b44081601206980cafcd6ed3ecb367b6.tar.xz
linux-dev-d4ff6121b44081601206980cafcd6ed3ecb367b6.zip
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. Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/mux.c')
-rw-r--r--arch/arm/mach-omap2/mux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index b4f90661382c..c7fb22abc219 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -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);