spi: dw: move piece of code out of condition
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 24 Feb 2015 11:32:10 +0000 (13:32 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 24 Feb 2015 14:43:33 +0000 (23:43 +0900)
There is no sense to keep a member assignment in the internal structure inside
the condition which reprograms HW. It makes code readability better if kept
outside of the condition.

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

index 5a97a62b298ac1a526d4c1bde932f3eb2d5ad574..29157f00f45a9618872db5fca83cc29048adb3c6 100644 (file)
@@ -494,10 +494,11 @@ static void pump_transfers(unsigned long data)
                        dw_writew(dws, DW_SPI_TXFLTR, txint_level);
 
                spi_enable_chip(dws, 1);
-               if (cs_change)
-                       dws->prev_chip = chip;
        }
 
+       if (cs_change)
+               dws->prev_chip = chip;
+
        if (dws->dma_mapped)
                dws->dma_ops->dma_transfer(dws, cs_change);