mfd: kempld-core: Fix potential hang-up during boot
authorGuenter Roeck <linux@roeck-us.net>
Thu, 20 Mar 2014 15:12:28 +0000 (08:12 -0700)
committerLee Jones <lee.jones@linaro.org>
Thu, 20 Mar 2014 15:58:25 +0000 (15:58 +0000)
commit204747c970c0d568721c76ab8a57dde0e5dcf0d5
tree2235bb09163819c324a8bbb1473fcdd394c37779
parent5a78401623740c892868d5929b33f5cda8fe819e
mfd: kempld-core: Fix potential hang-up during boot

On PXT and COMe-cPC2 boards it is observed that the hardware
mutex is acquired but not being released during initialization.
This can result in a hang-up during boot if the driver is built
into the kernel.

Releasing the mutex twice if it was acquired fixes the problem.
Subsequent request/release cycles work as expected, so the fix is
only needed during initialization.

Cc: <stable@vger.kernel.org>
Reviewed-by: Michael Brunner <michael.brunner@kontron.com>
Tested-by: Michael Brunner <michael.brunner@kontron.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/kempld-core.c