From: Marek Vasut Date: Mon, 8 Jul 2024 21:18:57 +0000 (+0200) Subject: Input: ads7846 - ratelimit the spi_sync error message X-Git-Tag: v6.6.52~66 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3acb2392df34e8ba6e35fe6ddfcd088fe3aa235b;p=thirdparty%2Fkernel%2Fstable.git Input: ads7846 - ratelimit the spi_sync error message [ Upstream commit ccbfea78adf75d3d9e87aa739dab83254f5333fa ] In case the touch controller is not connected, this message keeps scrolling on the console indefinitelly. Ratelimit it to avoid filling kernel logs. " ads7846 spi2.1: spi_sync --> -22 " Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20240708211913.171243-1-marex@denx.de Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin --- diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index a66375700a630..8b8c43b3c27f2 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -808,7 +808,7 @@ static void ads7846_read_state(struct ads7846 *ts) m = &ts->msg[msg_idx]; error = spi_sync(ts->spi, m); if (error) { - dev_err(&ts->spi->dev, "spi_sync --> %d\n", error); + dev_err_ratelimited(&ts->spi->dev, "spi_sync --> %d\n", error); packet->ignore = true; return; }