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: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
efe27f577a
commit
80cd39faed
1 changed files with 2 additions and 2 deletions
|
@ -786,13 +786,13 @@ static int spi_pl022_transceive_impl(const struct device *dev,
|
||||||
if (cfg->dma_enabled) {
|
if (cfg->dma_enabled) {
|
||||||
#if defined(CONFIG_SPI_PL022_DMA)
|
#if defined(CONFIG_SPI_PL022_DMA)
|
||||||
for (size_t i = 0; i < ARRAY_SIZE(data->dma); i++) {
|
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};
|
struct dma_status stat = {.busy = true};
|
||||||
|
|
||||||
dma_stop(cfg->dma[i].dev, cfg->dma[i].channel);
|
dma_stop(cfg->dma[i].dev, cfg->dma[i].channel);
|
||||||
|
|
||||||
while (stat.busy) {
|
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;
|
data->dma[i].count = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue