]> Pileus Git - ~andy/linux/commit
ARM: OMAP: Fix kernel panic with HSMMC when twl4030_gpio is a module
authorTony Lindgren <tony@atomide.com>
Mon, 20 Feb 2012 17:43:28 +0000 (09:43 -0800)
committerTony Lindgren <tony@atomide.com>
Mon, 20 Feb 2012 17:43:28 +0000 (09:43 -0800)
commit97899e555b76ce64222303bc8d46fda9d49eb14b
tree80aac18ac36518bc68a73400ba38c00f59a61d08
parentb01543dfe67bb1d191998e90d20534dc354de059
ARM: OMAP: Fix kernel panic with HSMMC when twl4030_gpio is a module

On some omaps twl4030_gpio has a callback to try to initialize
the MMC controller. If twl4030_gpio is compiled as a module,
bad things can happen because the callback function starts
calling functions that are supposed to be marked __init:

Kernel panic - not syncing: Attempted to kill the idle task!
twl4030_gpio twl4030_gpio: can't dispatch IRQs from modules
gpiochip_add: registered GPIOs 192 to 209 on device: twl4030
Unable to handle kernel paging request at virtual address b82a4c74
...

Additionally if this does not fail, warnings are produced
about trying to register the MMC multiple times.

Fix this by removing __init from omap_mux_get_by_name,
and add checks if omap2_hsmmc_init() is getting called more
than once.

Note that this will get fixed properly later on by splitting
omap2_hsmmc_init into two functions.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/hsmmc.c
arch/arm/mach-omap2/mux.c