diff options
| author | Mark Brown <broonie@kernel.org> | 2021-01-13 17:56:59 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2021-01-13 17:56:59 +0000 |
| commit | 2d446c98cde3ffccfd14849b7dda4194ab62dd20 (patch) | |
| tree | 9b7f048dcddec04d94527132834fc056745fdb6d /drivers/spi/spi-stm32.c | |
| parent | 44a4cfad8d78efcda9ec0dd97ceea38d8b602f24 (diff) | |
| parent | 7c53f6b671f4aba70ff15e1b05148b10d58c2837 (diff) | |
Merge v5.11-rc3
Diffstat (limited to 'drivers/spi/spi-stm32.c')
| -rw-r--r-- | drivers/spi/spi-stm32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c index 471dedf3d339..6017209c6d2f 100644 --- a/drivers/spi/spi-stm32.c +++ b/drivers/spi/spi-stm32.c @@ -493,9 +493,9 @@ static u32 stm32h7_spi_prepare_fthlv(struct stm32_spi *spi, u32 xfer_len) /* align packet size with data registers access */ if (spi->cur_bpw > 8) - fthlv -= (fthlv % 2); /* multiple of 2 */ + fthlv += (fthlv % 2) ? 1 : 0; else - fthlv -= (fthlv % 4); /* multiple of 4 */ + fthlv += (fthlv % 4) ? (4 - (fthlv % 4)) : 0; if (!fthlv) fthlv = 1; |
