Commit 80cd39fa authored by Daniel Leung's avatar Daniel Leung Committed by Fabio Baltieri
Browse files

spi: pl022: remove shadow variables



Removes the shadow variable found by -Wshadow. The value of this
variable is the same throughout the for loop, so there is no
need to assign it again for each iteration.

Signed-off-by: default avatarDaniel Leung <daniel.leung@intel.com>
parent efe27f57
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -786,13 +786,13 @@ static int spi_pl022_transceive_impl(const struct device *dev,
	if (cfg->dma_enabled) {
#if defined(CONFIG_SPI_PL022_DMA)
		for (size_t i = 0; i < ARRAY_SIZE(data->dma); i++) {
			const struct spi_pl022_cfg *cfg = dev->config;
			struct dma_status stat = {.busy = true};

			dma_stop(cfg->dma[i].dev, cfg->dma[i].channel);

			while (stat.busy) {
				dma_get_status(cfg->dma[i].dev, cfg->dma[i].channel, &stat);
				dma_get_status(cfg->dma[i].dev,
					       cfg->dma[i].channel, &stat);
			}

			data->dma[i].count = 0;