spi: spi-fsl-dspi: Remove duplicated register write
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Tue, 15 Sep 2015 13:26:25 +0000 (16:26 +0300)
committerMark Brown <broonie@kernel.org>
Thu, 17 Sep 2015 17:35:59 +0000 (18:35 +0100)
SPI core makes sure that transfer speed is always set so code here writes
the same register with the same value twice. Code has been doing this from
the beginning.

This looks to me some sort of copy paste error so I'm removing the second
write. If this is not the case we can bring it back with a comment.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsl-dspi.c

index 86bcdd68c1fe09f1640fc352cc2d94f0aa53566d..59a11437db7090f9c8464f8ca0584c789be2e997 100644 (file)
@@ -409,9 +409,6 @@ static int dspi_transfer_one_message(struct spi_master *master,
                                SPI_MCR_CLR_TXF | SPI_MCR_CLR_RXF);
                regmap_write(dspi->regmap, SPI_CTAR(dspi->cs),
                                dspi->cur_chip->ctar_val);
-               if (transfer->speed_hz)
-                       regmap_write(dspi->regmap, SPI_CTAR(dspi->cs),
-                                       dspi->cur_chip->ctar_val);
 
                trans_mode = dspi->devtype_data->trans_mode;
                switch (trans_mode) {