aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRanjith Lohithakshan <ranjithl@ti.com>2010-02-17 12:17:01 -0500
committerTony Lindgren <tony@atomide.com>2010-02-17 12:51:41 -0500
commitb72c7d543589736d43da531566490dd31572f5ca (patch)
tree186180445721319b35e5ff8e253f0bb7f124ae12 /arch
parent724e6d3fe8003c3f60bf404bf22e4e331327c596 (diff)
omap: Remove DEBUG_FS dependency for mux name checking
The check for a valid mux name should be performed regardless of whether DEBUG_FS is enabled or not. Otherwise without DEBUG_FS, we get: Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = c0004000 [00000000] *pgd=00000000 Internal error: Oops: 5 [#1] last sysfs file: Modules linked in: CPU: 0 Not tainted (2.6.33-rc8 #10) PC is at strcmp+0x18/0x40 LR is at omap_mux_init_signal+0x68/0x14c ... This fixes the issue currently seen with boards not booting up if DEBUG_FS is not enabled in defconfig. Note that the earlier ifndef + ifdef now becomes simpler ifdef else: If CONFIG_OMAP_MUX is selected, we use pin names. If it's not selected, we only want the GPIO to mux register mapping. Signed-off-by: Ranjith Lohithakshan <ranjithl@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/mux.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 5fedc50c58e4..5fef73f4743d 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -961,16 +961,14 @@ static void __init omap_mux_init_list(struct omap_mux *superset)
961 while (superset->reg_offset != OMAP_MUX_TERMINATOR) { 961 while (superset->reg_offset != OMAP_MUX_TERMINATOR) {
962 struct omap_mux *entry; 962 struct omap_mux *entry;
963 963
964#ifndef CONFIG_OMAP_MUX 964#ifdef CONFIG_OMAP_MUX
965 /* Skip pins that are not muxed as GPIO by bootloader */ 965 if (!superset->muxnames || !superset->muxnames[0]) {
966 if (!OMAP_MODE_GPIO(omap_mux_read(superset->reg_offset))) {
967 superset++; 966 superset++;
968 continue; 967 continue;
969 } 968 }
970#endif 969#else
971 970 /* Skip pins that are not muxed as GPIO by bootloader */
972#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) 971 if (!OMAP_MODE_GPIO(omap_mux_read(superset->reg_offset))) {
973 if (!superset->muxnames || !superset->muxnames[0]) {
974 superset++; 972 superset++;
975 continue; 973 continue;
976 } 974 }