spi: rspi: Use dev_warn_once() instead of open-coding
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 2 Jan 2020 13:38:19 +0000 (14:38 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 7 Jan 2020 22:33:08 +0000 (22:33 +0000)
Use the helper introduced by commit e135303bd5bebcd2 ("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>
drivers/spi/spi-rspi.c

index 74a12f4dee849125f801b89002cfc8e02cdd3283..e54a25f848ea38c7fd3150cd53a60824df4bd7eb 100644 (file)
@@ -620,9 +620,8 @@ no_dma_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;
 }