mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
spi: dw: Use spi_bpw_to_bytes() helper
Use existing helper to get amount of bytes (as power-of-two value) from bits per word. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20250417152529.490582-3-andriy.shevchenko@linux.intel.com Acked-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
163ddf1fea
commit
e30b7a7566
|
|
@ -423,7 +423,7 @@ static int dw_spi_transfer_one(struct spi_controller *host,
|
|||
int ret;
|
||||
|
||||
dws->dma_mapped = 0;
|
||||
dws->n_bytes = roundup_pow_of_two(BITS_TO_BYTES(transfer->bits_per_word));
|
||||
dws->n_bytes = spi_bpw_to_bytes(transfer->bits_per_word);
|
||||
dws->tx = (void *)transfer->tx_buf;
|
||||
dws->tx_len = transfer->len / dws->n_bytes;
|
||||
dws->rx = transfer->rx_buf;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user