diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-08-22 11:41:34 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-22 14:07:09 -0400 |
commit | 96b3eace39d2ecfdb07003856ddd8f6973dfe7bb (patch) | |
tree | fdb80b35723b9e7493afc0b9b49b654d2ce6c506 /drivers/spi/spi.c | |
parent | b36f4be3de1b123d8601de062e7dbfc904f305fb (diff) |
spi: Remove a redundant test for master->running in spi_queued_transfer
We have tested master->running immediately after grab the master->queue_lock.
The status of master->running won't be changed until we release the lock.
Thus remove a redundant test for master->running.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r-- | drivers/spi/spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 978dda2c5239..b1db83f1b4aa 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c | |||
@@ -774,7 +774,7 @@ static int spi_queued_transfer(struct spi_device *spi, struct spi_message *msg) | |||
774 | msg->status = -EINPROGRESS; | 774 | msg->status = -EINPROGRESS; |
775 | 775 | ||
776 | list_add_tail(&msg->queue, &master->queue); | 776 | list_add_tail(&msg->queue, &master->queue); |
777 | if (master->running && !master->busy) | 777 | if (!master->busy) |
778 | queue_kthread_work(&master->kworker, &master->pump_messages); | 778 | queue_kthread_work(&master->kworker, &master->pump_messages); |
779 | 779 | ||
780 | spin_unlock_irqrestore(&master->queue_lock, flags); | 780 | spin_unlock_irqrestore(&master->queue_lock, flags); |