aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r--drivers/spi/spi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 76e6ddf00ccc..6ef349f82b5f 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -790,7 +790,7 @@ static int spi_queued_transfer(struct spi_device *spi, struct spi_message *msg)
790 msg->status = -EINPROGRESS; 790 msg->status = -EINPROGRESS;
791 791
792 list_add_tail(&msg->queue, &master->queue); 792 list_add_tail(&msg->queue, &master->queue);
793 if (master->running && !master->busy) 793 if (!master->busy)
794 queue_kthread_work(&master->kworker, &master->pump_messages); 794 queue_kthread_work(&master->kworker, &master->pump_messages);
795 795
796 spin_unlock_irqrestore(&master->queue_lock, flags); 796 spin_unlock_irqrestore(&master->queue_lock, flags);
@@ -1230,7 +1230,7 @@ int spi_register_master(struct spi_master *master)
1230 else { 1230 else {
1231 status = spi_master_initialize_queue(master); 1231 status = spi_master_initialize_queue(master);
1232 if (status) { 1232 if (status) {
1233 device_unregister(&master->dev); 1233 device_del(&master->dev);
1234 goto done; 1234 goto done;
1235 } 1235 }
1236 } 1236 }
@@ -1456,6 +1456,7 @@ static int __spi_async(struct spi_device *spi, struct spi_message *message)
1456 * (SPI_NBITS_SINGLE) if it is not set for this transfer. 1456 * (SPI_NBITS_SINGLE) if it is not set for this transfer.
1457 */ 1457 */
1458 list_for_each_entry(xfer, &message->transfers, transfer_list) { 1458 list_for_each_entry(xfer, &message->transfers, transfer_list) {
1459 message->frame_length += xfer->len;
1459 if (!xfer->bits_per_word) 1460 if (!xfer->bits_per_word)
1460 xfer->bits_per_word = spi->bits_per_word; 1461 xfer->bits_per_word = spi->bits_per_word;
1461 if (!xfer->speed_hz) { 1462 if (!xfer->speed_hz) {