Skip to content

Commit

Permalink
spi: dw: move piece of code out of condition
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Shevchenko authored and Mark Brown committed Feb 24, 2015
1 parent c517d83 commit 39bc03b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/spi/spi-dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 39bc03b

Please sign in to comment.