]> git.karo-electronics.de Git - linux-beck.git/blobdiff - drivers/spi/spi.c
Merge remote-tracking branch 'spi/topic/qspi' into spi-next
[linux-beck.git] / drivers / spi / spi.c
index 76e6ddf00ccc4b90f0a7001f5ce78ca1c7282413..6ef349f82b5f3624db4c9511b29c1ea125227a70 100644 (file)
@@ -790,7 +790,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);
@@ -1230,7 +1230,7 @@ int spi_register_master(struct spi_master *master)
        else {
                status = spi_master_initialize_queue(master);
                if (status) {
-                       device_unregister(&master->dev);
+                       device_del(&master->dev);
                        goto done;
                }
        }
@@ -1456,6 +1456,7 @@ static int __spi_async(struct spi_device *spi, struct spi_message *message)
         * (SPI_NBITS_SINGLE) if it is not set for this transfer.
         */
        list_for_each_entry(xfer, &message->transfers, transfer_list) {
+               message->frame_length += xfer->len;
                if (!xfer->bits_per_word)
                        xfer->bits_per_word = spi->bits_per_word;
                if (!xfer->speed_hz) {