From: Simon Glass Date: Fri, 3 Jul 2015 00:16:11 +0000 (-0600) Subject: exynos: spi: Convert the timeout to debug() X-Git-Tag: v2015.10-rc2~394^2~43 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c7d50e7fb9cc7e71dde7d630b157334e7f8b63fb;p=u-boot exynos: spi: Convert the timeout to debug() Since the timeout is reported through normal channels, and is sometimes expected (e.g. if the bus is being probed for a non-existent device), don't display the message in the driver. In general, drivers should not write to the console as this limits their usefulness in error conditions. Signed-off-by: Simon Glass --- diff --git a/drivers/spi/exynos_spi.c b/drivers/spi/exynos_spi.c index 67f6b2d7cd..6d77c319e7 100644 --- a/drivers/spi/exynos_spi.c +++ b/drivers/spi/exynos_spi.c @@ -190,9 +190,9 @@ static int spi_rx_tx(struct exynos_spi_priv *priv, int todo, spi_request_bytes(regs, toread, step); } if (priv->skip_preamble && get_timer(start) > 100) { - printf("SPI timeout: in_bytes=%d, out_bytes=%d, ", - in_bytes, out_bytes); - return -1; + debug("SPI timeout: in_bytes=%d, out_bytes=%d, ", + in_bytes, out_bytes); + return -ETIMEDOUT; } }