Message ID | a94544be59233be694b317df0a8cdeae.squirrel@webmail.plus.net (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | spi: spi-imx: fix off-by-one in mx51 CPU mode burst length | expand |
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index 7c1fcd5ed52f7..100552e6c56bc 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -743,8 +743,8 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx_data *spi_imx, ctrl |= (MX51_ECSPI_CTRL_MAX_BURST * BITS_PER_BYTE - 1) << MX51_ECSPI_CTRL_BL_OFFSET; else - ctrl |= spi_imx->count / DIV_ROUND_UP(spi_imx->bits_per_word, - BITS_PER_BYTE) * spi_imx->bits_per_word + ctrl |= (spi_imx->count / DIV_ROUND_UP(spi_imx->bits_per_word, + BITS_PER_BYTE) * spi_imx->bits_per_word - 1) << MX51_ECSPI_CTRL_BL_OFFSET; } }