MLK-11848-1 spi: spi: Revert "spi: check tx_buf and rx_buf in spi_unmap_msg"
authorRobin Gong <b38343@freescale.com>
Tue, 10 Nov 2015 10:06:53 +0000 (18:06 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:49:13 +0000 (14:49 -0500)
This commit 06634f8a25f4c5e4ff0c0ef5368a48eb394db63b cherry-picked wrong,
and that cause SPI DMA mode never works. Actually, no need this patch since
this patch has already been upsteaminged as below:

commit f8bb820da4ae863c676156627973a950129559fb
Author: Robin Gong <b38343@freescale.com>
Date:   Thu Apr 16 10:54:18 2015 +0800

    spi: check tx_buf and rx_buf in spi_unmap_msg

Signed-off-by: Robin Gong <b38343@freescale.com>
drivers/spi/spi.c

index 257e152..6db8063 100644 (file)
@@ -807,15 +807,6 @@ static int __spi_map_msg(struct spi_master *master, struct spi_message *msg)
                rx_dev = master->dev.parent;
 
        list_for_each_entry(xfer, &msg->transfers, transfer_list) {
-               /*
-                * Restore the original value of tx_buf or rx_buf if they are
-                * NULL.
-                */
-               if (xfer->tx_buf == master->dummy_tx)
-                       xfer->tx_buf = NULL;
-               if (xfer->rx_buf == master->dummy_rx)
-                       xfer->rx_buf = NULL;
-
                if (!master->can_dma(master, msg->spi, xfer))
                        continue;