aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-tegra20-slink.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi-tegra20-slink.c')
-rw-r--r--drivers/spi/spi-tegra20-slink.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c
index 651167f2e0af..7a95bddfb604 100644
--- a/drivers/spi/spi-tegra20-slink.c
+++ b/drivers/spi/spi-tegra20-slink.c
@@ -284,8 +284,7 @@ static unsigned tegra_slink_calculate_curr_xfer_param(
284 unsigned max_len; 284 unsigned max_len;
285 unsigned total_fifo_words; 285 unsigned total_fifo_words;
286 286
287 bits_per_word = t->bits_per_word ? t->bits_per_word : 287 bits_per_word = t->bits_per_word;
288 spi->bits_per_word;
289 tspi->bytes_per_word = (bits_per_word - 1) / 8 + 1; 288 tspi->bytes_per_word = (bits_per_word - 1) / 8 + 1;
290 289
291 if (bits_per_word == 8 || bits_per_word == 16) { 290 if (bits_per_word == 8 || bits_per_word == 16) {
@@ -378,8 +377,7 @@ static unsigned int tegra_slink_read_rx_fifo_to_client_rxbuf(
378 } else { 377 } else {
379 unsigned int bits_per_word; 378 unsigned int bits_per_word;
380 379
381 bits_per_word = t->bits_per_word ? t->bits_per_word : 380 bits_per_word = t->bits_per_word;
382 tspi->cur_spi->bits_per_word;
383 for (count = 0; count < rx_full_count; count++) { 381 for (count = 0; count < rx_full_count; count++) {
384 x = tegra_slink_readl(tspi, SLINK_RX_FIFO); 382 x = tegra_slink_readl(tspi, SLINK_RX_FIFO);
385 for (i = 0; (i < tspi->bytes_per_word); i++) 383 for (i = 0; (i < tspi->bytes_per_word); i++)
@@ -444,8 +442,7 @@ static void tegra_slink_copy_spi_rxbuf_to_client_rxbuf(
444 unsigned int x; 442 unsigned int x;
445 unsigned int rx_mask, bits_per_word; 443 unsigned int rx_mask, bits_per_word;
446 444
447 bits_per_word = t->bits_per_word ? t->bits_per_word : 445 bits_per_word = t->bits_per_word;
448 tspi->cur_spi->bits_per_word;
449 rx_mask = (1 << bits_per_word) - 1; 446 rx_mask = (1 << bits_per_word) - 1;
450 for (count = 0; count < tspi->curr_dma_words; count++) { 447 for (count = 0; count < tspi->curr_dma_words; count++) {
451 x = tspi->rx_dma_buf[count]; 448 x = tspi->rx_dma_buf[count];