diff options
author | Robin Gong <b38343@freescale.com> | 2015-04-20 11:39:58 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2015-05-08 16:34:46 +0800 |
commit | cf8f79fc0b70b4bb835e556174dea3eb22b7b013 (patch) | |
tree | 34705bf8b6089db2fc14fbd520546cfa8decf5f2 /drivers/spi | |
parent | c34464edc3b6f7d9145f488aa042aef750e28287 (diff) |
MLK-10689: spi: fix 'git am' patch
Looks the below patch was applied wrongly indeed by 'git am', although there
is no any error or warning reported when do 'git am'. Not sure the root cause,
just take it back.
commit e66a17dc5c68e37ea110d171ba7ed94c02f9d7ce
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>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 0eada4808011..afda8387456f 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -656,15 +656,6 @@ static int __spi_map_msg(struct spi_master *master, struct spi_message *msg) rx_dev = master->dma_rx->device->dev; 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; @@ -705,6 +696,15 @@ static int spi_unmap_msg(struct spi_master *master, struct spi_message *msg) rx_dev = master->dma_rx->device->dev; 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; |