mirror of https://gitee.com/openkylin/linux.git
spi: rspi: Use dev_warn_once() instead of open-coding
Use the helper introduced by commit e135303bd5
("device: Add
dev_<level>_once variants") instead of open-coding the same operation.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20200102133822.29346-4-geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
aa32f76e0a
commit
1bec84ddd8
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue