diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2016-09-04 07:56:57 (GMT) |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-09-06 10:55:20 (GMT) |
commit | a755af52f8ef278985d1475070c0647f2e6e47a7 (patch) | |
tree | a589d76588814c1f556565c9e362318bb1c780be /drivers/spi/spi-fsl-espi.c | |
parent | daae020ce9fe4324322c6ed18a840234a05d76b3 (diff) | |
download | linux-a755af52f8ef278985d1475070c0647f2e6e47a7.tar.xz |
spi: fsl-espi: simplify fsl_espi_setup_transfer
Simplify fsl_espi_setup_transfer a little.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-fsl-espi.c')
-rw-r--r-- | drivers/spi/spi-fsl-espi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c index a9004fe..b00313b 100644 --- a/drivers/spi/spi-fsl-espi.c +++ b/drivers/spi/spi-fsl-espi.c @@ -166,12 +166,10 @@ static void fsl_espi_setup_transfer(struct spi_device *spi, mpc8xxx_spi->get_rx = cs->get_rx; mpc8xxx_spi->get_tx = cs->get_tx; - bits_per_word = bits_per_word - 1; - /* mask out bits we are going to set */ cs->hw_mode &= ~(CSMODE_LEN(0xF) | CSMODE_DIV16 | CSMODE_PM(0xF)); - cs->hw_mode |= CSMODE_LEN(bits_per_word); + cs->hw_mode |= CSMODE_LEN(bits_per_word - 1); if ((mpc8xxx_spi->spibrg / hz) > 64) { cs->hw_mode |= CSMODE_DIV16; |