Commit 1bec84dd authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Mark Brown

spi: rspi: Use dev_warn_once() instead of open-coding

Use the helper introduced by commit e135303b ("device: Add
dev_<level>_once variants") instead of open-coding the same operation.
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20200102133822.29346-4-geert+renesas@glider.beSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent aa32f76e
......@@ -620,9 +620,8 @@ static int rspi_dma_transfer(struct rspi_data *rspi, struct sg_table *tx,
dmaengine_terminate_all(rspi->ctlr->dma_rx);
no_dma_rx:
if (ret == -EAGAIN) {
pr_warn_once("%s %s: DMA not available, falling back to PIO\n",
dev_driver_string(&rspi->ctlr->dev),
dev_name(&rspi->ctlr->dev));
dev_warn_once(&rspi->ctlr->dev,
"DMA not available, falling back to PIO\n");
}
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment