summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-dw.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-05-07 13:54:49 +0200
committerMark Brown <broonie@kernel.org>2020-05-07 14:43:00 +0200
commita041e672cb57201d152bfc314e52d41e7643375d (patch)
tree7d1bf6b1c1c1415442ff3fd6cdaf43267e4c28e9 /drivers/spi/spi-dw.c
parentspi: dw: Avoid useless assignments in generic DMA setup (diff)
downloadlinux-a041e672cb57201d152bfc314e52d41e7643375d.tar.xz
linux-a041e672cb57201d152bfc314e52d41e7643375d.zip
spi: dw: Get rid of dma_inited flag
This flag is superfluous in all cases where it's being used, i.e. * ->can_dma() won't be called without dma_inited == 1 * DMA ->exit() callback can rely on txchan and rxchan variables So, get rid of dma_inited flag. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200507115449.8093-2-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.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
index b9f651e9ca02..6de196df9c96 100644
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -470,7 +470,6 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws)
dws->master = master;
dws->type = SSI_MOTO_SPI;
- dws->dma_inited = 0;
dws->dma_addr = (dma_addr_t)(dws->paddr + DW_SPI_DR);
spin_lock_init(&dws->buf_lock);
@@ -509,7 +508,6 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws)
ret = dws->dma_ops->dma_init(dev, dws);
if (ret) {
dev_warn(dev, "DMA init failed\n");
- dws->dma_inited = 0;
} else {
master->can_dma = dws->dma_ops->can_dma;
}