]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
spi: sh-msiof: Use dev_warn_once() instead of open-coding
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 30 Nov 2017 13:38:50 +0000 (14:38 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 30 Nov 2017 16:57:06 +0000 (16:57 +0000)
Use the helper introduced by commit e135303bd5bebcd2 ("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>
drivers/spi/spi-sh-msiof.c

index fcd261f98b9fd92189f1eb9acd8aee7be484af82..81a9144f5442cdb4827f2174281776a498f7cf9b 100644 (file)
@@ -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)