spi: Fix mcux dspi driver to parse lsb transfer mode correctly

The mcux dspi driver was incorrectly using the macro SPI_MODE_GET() to
parse the operation for SPI_TRANSFER_LSB. The effect of this bug was
that the driver would quietly always operate in SPI_TRANSFER_MSB mode.

Coverity-CID: 185401

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
Maureen Helm 2018-05-01 16:43:46 -05:00 committed by Anas Nashif
commit c6f2b4ccb8

View file

@ -154,7 +154,7 @@ static int spi_mcux_configure(struct device *dev,
: kDSPI_ClockPhaseFirstEdge;
master_config.ctarConfig.direction =
(SPI_MODE_GET(spi_cfg->operation) & SPI_TRANSFER_LSB)
(spi_cfg->operation & SPI_TRANSFER_LSB)
? kDSPI_LsbFirst
: kDSPI_MsbFirst;