summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-dw.c
diff options
context:
space:
mode:
authorSerge Semin <Sergey.Semin@baikalelectronics.ru>2020-05-22 03:07:54 +0300
committerMark Brown <broonie@kernel.org>2020-05-22 13:45:55 +0100
commit4fdc03a9bc47b6cf35a8821e545075d9f5f24906 (patch)
tree6ce02afe43b14fc1d573d1eed8aa90e6bf1fbc49 /drivers/spi/spi-dw.c
parent595c19d4543fed18384fd7d1edf6f381d4eed34e (diff)
downloadlinux-stable-4fdc03a9bc47b6cf35a8821e545075d9f5f24906.tar.gz
linux-stable-4fdc03a9bc47b6cf35a8821e545075d9f5f24906.tar.bz2
linux-stable-4fdc03a9bc47b6cf35a8821e545075d9f5f24906.zip
spi: dw: Discard dma_width member of the dw_spi structure
This member has exactly the same value as n_bytes of the DW SPI private data object, it's calculated at the same point of the transfer method, n_bytes isn't changed during the whole transfer, and they even serve for the same purpose - keep number of bytes per transfer word, though the dma_width is used only to calculate the DMA source/destination addresses width, which n_bytes could be also utilized for. Taking all of these into account let's replace the dma_width member usage with n_bytes one and remove the former. Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Georgy Vlasov <Georgy.Vlasov@baikalelectronics.ru> Cc: Ramil Zaripov <Ramil.Zaripov@baikalelectronics.ru> Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: Paul Burton <paulburton@kernel.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Rob Herring <robh+dt@kernel.org> Cc: linux-mips@vger.kernel.org Cc: devicetree@vger.kernel.org Link: https://lore.kernel.org/r/20200522000806.7381-6-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-dw.c')
-rw-r--r--drivers/spi/spi-dw.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
index 450c8218caeb..1edb8cdd11ee 100644
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -353,7 +353,6 @@ static int dw_spi_transfer_one(struct spi_controller *master,
}
dws->n_bytes = DIV_ROUND_UP(transfer->bits_per_word, BITS_PER_BYTE);
- dws->dma_width = DIV_ROUND_UP(transfer->bits_per_word, BITS_PER_BYTE);
cr0 = dws->update_cr0(master, spi, transfer);
dw_writel(dws, DW_SPI_CTRLR0, cr0);