Skip to content

Commit 2c75ad0

Browse files
decsnynashif
authored andcommitted
Revert "drivers: spi: fix the update of spi_context tx & rx length"
This reverts commit 4a486ce. This change was totally wrong. Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
1 parent c0f17f9 commit 2c75ad0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/spi/spi_context.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ void spi_context_update_tx(struct spi_context *ctx, uint8_t dfs, uint32_t len)
496496
return;
497497
}
498498

499-
ctx->tx_len -= len * dfs;
499+
ctx->tx_len -= len;
500500
if (!ctx->tx_len) {
501501
/* Current buffer is done. Get the next one to be processed. */
502502
++ctx->current_tx;
@@ -555,7 +555,7 @@ void spi_context_update_rx(struct spi_context *ctx, uint8_t dfs, uint32_t len)
555555
return;
556556
}
557557

558-
ctx->rx_len -= len * dfs;
558+
ctx->rx_len -= len;
559559
if (!ctx->rx_len) {
560560
/* Current buffer is done. Get the next one to be processed. */
561561
++ctx->current_rx;

0 commit comments

Comments
 (0)