summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-dw.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2015-02-24 13:32:10 +0200
committerMark Brown <broonie@kernel.org>2015-02-24 23:43:33 +0900
commit39bc03bfecab38e7532449d54aeef3db817084af (patch)
treed26667c021fabf9545f6ee81abfba512faee16a5 /drivers/spi/spi-dw.c
parentc517d838eb7d07bbe9507871fab3931deccff539 (diff)
downloadlinux-39bc03bfecab38e7532449d54aeef3db817084af.tar.bz2
spi: dw: move piece of code out of condition
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>
Diffstat (limited to 'drivers/spi/spi-dw.c')
-rw-r--r--drivers/spi/spi-dw.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
index 5a97a62b298a..29157f00f45a 100644
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -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);