Commit 0ca54b29 authored by Sean Young's avatar Sean Young Committed by Mauro Carvalho Chehab

media: rc: be less noisy when driver misbehaves

Since commit 48231f28 ("media: rc: drivers should produce alternate
pulse and space timing events"), on meson-ir we are regularly producing
errors. Reduce to warning level and only warn once to avoid flooding
the log.

A proper fix for meson-ir is going to be too large for v4.18.
Signed-off-by: default avatarSean Young <sean@mess.org>
Cc: stable@vger.kernel.org # 4.17+
Tested-by: default avatarJerome Brunet <jbrunet@baylibre.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 7daf201d
...@@ -30,13 +30,13 @@ static int ir_raw_event_thread(void *data) ...@@ -30,13 +30,13 @@ static int ir_raw_event_thread(void *data)
while (kfifo_out(&raw->kfifo, &ev, 1)) { while (kfifo_out(&raw->kfifo, &ev, 1)) {
if (is_timing_event(ev)) { if (is_timing_event(ev)) {
if (ev.duration == 0) if (ev.duration == 0)
dev_err(&dev->dev, "nonsensical timing event of duration 0"); dev_warn_once(&dev->dev, "nonsensical timing event of duration 0");
if (is_timing_event(raw->prev_ev) && if (is_timing_event(raw->prev_ev) &&
!is_transition(&ev, &raw->prev_ev)) !is_transition(&ev, &raw->prev_ev))
dev_err(&dev->dev, "two consecutive events of type %s", dev_warn_once(&dev->dev, "two consecutive events of type %s",
TO_STR(ev.pulse)); TO_STR(ev.pulse));
if (raw->prev_ev.reset && ev.pulse == 0) if (raw->prev_ev.reset && ev.pulse == 0)
dev_err(&dev->dev, "timing event after reset should be pulse"); dev_warn_once(&dev->dev, "timing event after reset should be pulse");
} }
list_for_each_entry(handler, &ir_raw_handler_list, list) list_for_each_entry(handler, &ir_raw_handler_list, list)
if (dev->enabled_protocols & if (dev->enabled_protocols &
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment