From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Thu, 2 Jul 2015 18:16:11 -0600 Subject: [U-Boot] [PATCH 34/55] exynos: spi: Convert the timeout to debug() In-Reply-To: <1435882592-487-1-git-send-email-sjg@chromium.org> References: <1435882592-487-1-git-send-email-sjg@chromium.org> Message-ID: <1435882592-487-35-git-send-email-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- drivers/spi/exynos_spi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/spi/exynos_spi.c b/drivers/spi/exynos_spi.c index 67f6b2d..6d77c31 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; } } -- 2.4.3.573.g4eafbef