spi: fsl-espi: simplify fsl_espi_setup_transfer
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 4 Sep 2016 07:56:57 +0000 (09:56 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 6 Sep 2016 10:55:20 +0000 (11:55 +0100)
Simplify fsl_espi_setup_transfer a little.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsl-espi.c

index a9004fe5a5ed2f2d6cbcf26445dc38fcc4a269d1..b00313bed7e9e9ccdea80ec8b2b122da075e5660 100644 (file)
@@ -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;