Skip to content

Commit ccbfea7

Browse files
Marek Vasutdtor
authored andcommitted
Input: ads7846 - ratelimit the spi_sync error message
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent a23e196 commit ccbfea7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/touchscreen/ads7846.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ static void ads7846_read_state(struct ads7846 *ts)
824824
m = &ts->msg[msg_idx];
825825
error = spi_sync(ts->spi, m);
826826
if (error) {
827-
dev_err(&ts->spi->dev, "spi_sync --> %d\n", error);
827+
dev_err_ratelimited(&ts->spi->dev, "spi_sync --> %d\n", error);
828828
packet->ignore = true;
829829
return;
830830
}

0 commit comments

Comments
 (0)