summaryrefslogtreecommitdiff
path: root/drivers/media/rc/serial_ir.c
diff options
context:
space:
mode:
authorMatthias Reichl <hias@horus.com>2021-01-05 10:30:23 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-01-11 12:58:44 +0100
commit06b831588b639ad9d94e4789b0250562228722c2 (patch)
treef5c4bede5a091b804eba763046e7b233dbbaac28 /drivers/media/rc/serial_ir.c
parent2984a99ff1c071c85dc09451c8adc859c22fbb96 (diff)
media: rc: fix timeout handling after switch to microsecond durations
Commit 528222d853f92 ("media: rc: harmonize infrared durations to microseconds") missed to switch some timeout calculations from nanoseconds to microseconds. This resulted in spurious key_up+key_down events at the last scancode if the rc device uses a long timeout (eg 100ms on nuvoton-cir) as the device timeout wasn't properly accounted for in the keyup timeout calculation. Fix this by applying the proper conversion functions. Cc: stable@vger.kernel.org Fixes: 528222d853f92 ("media: rc: harmonize infrared durations to microseconds") Signed-off-by: Matthias Reichl <hias@horus.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/rc/serial_ir.c')
-rw-r--r--drivers/media/rc/serial_ir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/rc/serial_ir.c b/drivers/media/rc/serial_ir.c
index 8cc28c92d05d..96ae0294ac10 100644
--- a/drivers/media/rc/serial_ir.c
+++ b/drivers/media/rc/serial_ir.c
@@ -385,7 +385,7 @@ static irqreturn_t serial_ir_irq_handler(int i, void *blah)
} while (!(sinp(UART_IIR) & UART_IIR_NO_INT)); /* still pending ? */
mod_timer(&serial_ir.timeout_timer,
- jiffies + nsecs_to_jiffies(serial_ir.rcdev->timeout));
+ jiffies + usecs_to_jiffies(serial_ir.rcdev->timeout));
ir_raw_event_handle(serial_ir.rcdev);