From 23fc86eb2f30fc975e5705bb1a2cf92956d2edd7 Mon Sep 17 00:00:00 2001 From: Tudor Ambarus Date: Fri, 30 Oct 2020 14:11:16 +0200 Subject: [PATCH] spi: atmel: Downgrade to dev_dbg when dma_request_chan() fails The IP's DMA capabilities are described in the SoC dtsi, to spare users duplicating the DMA bindings in their board device tree. Users that don't want to use DMA, have to overwrite the DMA bindings in their board device tree. An example is: commit ddcdaeb88242 ("ARM: dts: at91: sama5d2: Add DMA bindings for the SPI and UART flx4 functions") When the DMA bindings are overwritten, one could see on the console: atmel_spi fc018400.spi: error -ENODEV: No TX DMA channel, DMA is disabled atmel_spi fc018400.spi: Atmel SPI Controller using PIO only Choosing to not use DMA is not a reason to print an error message. More, the user is already informed when PIO is used: "Atmel SPI Controller using PIO only". Downgrade to dev_dbg when dma_request_chan() fails. Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201030121116.869105-1-tudor.ambarus@microchip.com Signed-off-by: Mark Brown --- drivers/spi/spi-atmel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index 0e5e64a..948396b 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c @@ -512,8 +512,8 @@ static int atmel_spi_configure_dma(struct spi_master *master, master->dma_tx = dma_request_chan(dev, "tx"); if (IS_ERR(master->dma_tx)) { - err = dev_err_probe(dev, PTR_ERR(master->dma_tx), - "No TX DMA channel, DMA is disabled\n"); + err = PTR_ERR(master->dma_tx); + dev_dbg(dev, "No TX DMA channel, DMA is disabled\n"); goto error_clear; } @@ -524,7 +524,7 @@ static int atmel_spi_configure_dma(struct spi_master *master, * No reason to check EPROBE_DEFER here since we have already * requested tx channel. */ - dev_err(dev, "No RX DMA channel, DMA is disabled\n"); + dev_dbg(dev, "No RX DMA channel, DMA is disabled\n"); goto error; } -- 2.7.4