diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-01 15:55:16 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-01 15:55:16 +0200 |
commit | e47ef0f1affff3e017d0477b283a26beeb45258a (patch) | |
tree | ae00210c3b875e235c3cea284c8bf44a841a5199 /drivers/spi/spi.c | |
parent | spi/spi-atmel: status information passed through controller data (diff) | |
parent | spi/mpc512x-psc: optionally keep PSC SS asserted across xfer segmensts (diff) | |
download | linux-e47ef0f1affff3e017d0477b283a26beeb45258a.tar.xz linux-e47ef0f1affff3e017d0477b283a26beeb45258a.zip |
Merge branch 'spi-fix' into spi-next
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r-- | drivers/spi/spi.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 0cabf1560550..45cb6a9d42c9 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -543,17 +543,16 @@ static void spi_pump_messages(struct kthread_work *work) /* Lock queue and check for queue work */ spin_lock_irqsave(&master->queue_lock, flags); if (list_empty(&master->queue) || !master->running) { - if (master->busy && master->unprepare_transfer_hardware) { - ret = master->unprepare_transfer_hardware(master); - if (ret) { - spin_unlock_irqrestore(&master->queue_lock, flags); - dev_err(&master->dev, - "failed to unprepare transfer hardware\n"); - return; - } + if (!master->busy) { + spin_unlock_irqrestore(&master->queue_lock, flags); + return; } master->busy = false; spin_unlock_irqrestore(&master->queue_lock, flags); + if (master->unprepare_transfer_hardware && + master->unprepare_transfer_hardware(master)) + dev_err(&master->dev, + "failed to unprepare transfer hardware\n"); return; } |