diff options
author | Charles Gordon <charles.gordon@digi.com> | 2011-01-14 12:40:40 -0500 |
---|---|---|
committer | Charles Gordon <charles.gordon@digi.com> | 2011-01-14 12:48:06 -0500 |
commit | f73f9bdcc48122e62895fdad776ff04ff5d169f6 (patch) | |
tree | c0fe7424a59828cd666a00e1e24430cded092b75 /drivers/fims | |
parent | 6a79171226004e60e80987132e8fa91ab4470e1f (diff) |
fim spi: Fixed invalid receive buffer problem
Code was setting the receive buffer pointer to NULL. This prevented us
from receiving data. Since most test applications used the same buffer
to send and receive, this problem went undetected for a while. Fixed
the driver so that it doesn't ignore the receive buffer passed to it.
Signed-off-by: Charles Gordon <charles.gordon@digi.com>
(cherry picked from commit 6efcec8aff82442b37c7324035de912fbab42bbf)
Signed-off-by: Charles Gordon <charles.gordon@digi.com>
Diffstat (limited to 'drivers/fims')
-rwxr-xr-x | drivers/fims/spi/fim_spi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/fims/spi/fim_spi.c b/drivers/fims/spi/fim_spi.c index f5d1377410f1..cc94ca8d9508 100755 --- a/drivers/fims/spi/fim_spi.c +++ b/drivers/fims/spi/fim_spi.c @@ -403,16 +403,14 @@ static int process_message(struct spi_fim *info, struct spi_message *message) */ memset(transfer->rx_buf, 0, transfer->len); fim_dma_buffer.data = transfer->rx_buf; - info->rx_buffer = transfer->rx_buf; - info->bytes_to_receive = transfer->len; } else { /* * Else if the user is graciously supplying a transmit buffer, then use it. */ fim_dma_buffer.data = (unsigned char *) transfer->tx_buf; - info->rx_buffer = NULL; - info->bytes_to_receive = transfer->len; } + info->rx_buffer = transfer->rx_buf; + info->bytes_to_receive = transfer->len; fim_dma_buffer.length = transfer->len; fim_dma_buffer.private = info; fim_dma_buffer.sent = 0; |