]> git.baikalelectronics.ru Git - kernel.git/commit
spi: Unlock a spinlock before calling into the controller driver.
authorBryan Freed <bfreed@chromium.org>
Wed, 13 Mar 2013 18:17:40 +0000 (11:17 -0700)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 1 Apr 2013 13:22:59 +0000 (14:22 +0100)
commit559a41ad8c242689a3d426419661f393dbb51199
tree57c741bdba95e18eab28fe82c2396b7b959c0f2a
parente2749bee383e26aa7062b0d720579f2117fded15
spi: Unlock a spinlock before calling into the controller driver.

spi_pump_messages() calls into a controller driver with
unprepare_transfer_hardware() which is documented as "This may sleep".
As in the prepare_transfer_hardware() call below, we should release the
queue_lock spinlock before making the call.
Rework the logic a bit to hold queue_lock to protect the 'busy' flag,
then release it to call unprepare_transfer_hardware().

Signed-off-by: Bryan Freed <bfreed@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/spi/spi.c