spi: dw: always reprogram CTRL0
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 24 Feb 2015 11:32:13 +0000 (13:32 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 24 Feb 2015 14:43:34 +0000 (23:43 +0900)
Instead of an additional reading from the register let's update it even if the
value is kept the same.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-dw.c

index 0e0c48b37b838ac2adbc87928be8636da30c36f8..281121f001388e7fd38d8dc330480ddd8595fb1c 100644 (file)
@@ -476,8 +476,7 @@ static void pump_transfers(unsigned long data)
        if (dw_readw(dws, DW_SPI_CTRL0) != cr0 || cs_change || clk_div || imask) {
                spi_enable_chip(dws, 0);
 
-               if (dw_readw(dws, DW_SPI_CTRL0) != cr0)
-                       dw_writew(dws, DW_SPI_CTRL0, cr0);
+               dw_writew(dws, DW_SPI_CTRL0, cr0);
 
                spi_set_clk(dws, chip->clk_div);
                spi_chip_sel(dws, spi, 1);