spi: Remove a redundant test for master->running in spi_queued_transfer
authorAxel Lin <axel.lin@ingics.com>
Thu, 22 Aug 2013 15:41:34 +0000 (23:41 +0800)
committerMark Brown <broonie@linaro.org>
Thu, 22 Aug 2013 18:07:09 +0000 (19:07 +0100)
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>
drivers/spi/spi.c

index 978dda2c523982f62c676573feb1955da0ca82da..b1db83f1b4aa7ff2fb66dc1c7f3525c5ac802867 100644 (file)
@@ -774,7 +774,7 @@ static int spi_queued_transfer(struct spi_device *spi, struct spi_message *msg)
        msg->status = -EINPROGRESS;
 
        list_add_tail(&msg->queue, &master->queue);
-       if (master->running && !master->busy)
+       if (!master->busy)
                queue_kthread_work(&master->kworker, &master->pump_messages);
 
        spin_unlock_irqrestore(&master->queue_lock, flags);