Skip to content

Commit

Permalink
spi: sh-msiof: Use dev_warn_once() instead of open-coding
Browse files Browse the repository at this point in the history
Use the helper introduced by commit e135303 ("device: Add
dev_<level>_once variants") instead of open-coding the same
functionality.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Geert Uytterhoeven authored and Mark Brown committed Nov 30, 2017
1 parent 4fbd8d1 commit 5d8e614
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/spi/spi-sh-msiof.c
Original file line number Diff line number Diff line change
Expand Up @@ -912,9 +912,8 @@ static int sh_msiof_transfer_one(struct spi_master *master,

ret = sh_msiof_dma_once(p, tx_buf, rx_buf, l);
if (ret == -EAGAIN) {
pr_warn_once("%s %s: DMA not available, falling back to PIO\n",
dev_driver_string(&p->pdev->dev),
dev_name(&p->pdev->dev));
dev_warn_once(&p->pdev->dev,
"DMA not available, falling back to PIO\n");
break;
}
if (ret)
Expand Down

0 comments on commit 5d8e614

Please sign in to comment.