Commit 196b0e2c authored by Jarkko Nikula's avatar Jarkko Nikula Committed by Mark Brown

spi: pxa2xx: Remove if statement that is always true in pump_transfers()

This is continuation to previous commit by separating unindentation from
variable removal done in previous commit. As said SPI core have validated
both the speed_hz and bits_per_word and the if statement here evaluates
always to true.

Remove the test and unindent the code block accordingly. While at it remove
also needless "cr0 = chip->cr0" as cr0 will be overwritten anyway and fix
block comment style.
Signed-off-by: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 4f1474b3
......@@ -918,9 +918,6 @@ static void pump_transfers(unsigned long data)
drv_data->read = drv_data->rx ? chip->read : null_reader;
/* Change speed and bit per word on a per transfer */
cr0 = chip->cr0;
if (transfer->speed_hz || transfer->bits_per_word) {
bits = transfer->bits_per_word;
speed = transfer->speed_hz;
......@@ -945,8 +942,10 @@ static void pump_transfers(unsigned long data)
drv_data->write = drv_data->write != null_writer ?
u32_writer : null_writer;
}
/* if bits/word is changed in dma mode, then must check the
* thresholds and burst also */
/*
* if bits/word is changed in dma mode, then must check the
* thresholds and burst also
*/
if (chip->enable_dma) {
if (pxa2xx_spi_set_dma_burst_and_threshold(chip,
message->spi,
......@@ -957,7 +956,6 @@ static void pump_transfers(unsigned long data)
}
cr0 = pxa2xx_configure_sscr0(drv_data, clk_div, bits);
}
message->state = RUNNING_STATE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment