From patchwork Tue May 31 19:00:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Cross X-Patchwork-Id: 833272 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4VJ1FWb021844 for ; Tue, 31 May 2011 19:01:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758180Ab1EaTAz (ORCPT ); Tue, 31 May 2011 15:00:55 -0400 Received: from smtp-out.google.com ([74.125.121.67]:44510 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758168Ab1EaTAy (ORCPT ); Tue, 31 May 2011 15:00:54 -0400 Received: from hpaq1.eem.corp.google.com (hpaq1.eem.corp.google.com [172.25.149.1]) by smtp-out.google.com with ESMTP id p4VJ0Ibb006071; Tue, 31 May 2011 12:00:18 -0700 Received: from walnut.mtv.corp.google.com (walnut.mtv.corp.google.com [172.18.102.62]) by hpaq1.eem.corp.google.com with ESMTP id p4VJ0Gab007000; Tue, 31 May 2011 12:00:17 -0700 Received: by walnut.mtv.corp.google.com (Postfix, from userid 99897) id 1EA8D257824; Tue, 31 May 2011 12:00:16 -0700 (PDT) From: Colin Cross To: Tony Lindgren Cc: Colin Cross , Russell King , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: omap2+: mux: Allow board mux settings to be NULL Date: Tue, 31 May 2011 12:00:09 -0700 Message-Id: <1306868410-23554-1-git-send-email-ccross@android.com> X-Mailer: git-send-email 1.7.4.1 X-System-Of-Record: true Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 31 May 2011 19:01:15 +0000 (UTC) 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 --- arch/arm/mach-omap2/mux.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index a4ab1e3..6788dbc 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);