mfd: mc13xxx-core: Initialize the lock prior to using it
authorFabio Estevam <fabio.estevam@freescale.com>
Tue, 15 Apr 2014 22:56:14 +0000 (19:56 -0300)
committerLee Jones <lee.jones@linaro.org>
Tue, 3 Jun 2014 07:11:13 +0000 (08:11 +0100)
After request_threaded_irq() is called there is a chance that an interrupt
may occur before the 'mc13xxx->lock' is initialized, which will trigger a kernel
oops.

In order to prevent that, move the initialization of 'mc13xxx->lock' prior to
requesting the interrupts.

Suggested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/mc13xxx-core.c

Simple merge