Skip to content

Commit e1def45

Browse files
HiassofTmchehab
authored andcommitted
media: rc: ite-cir: fix min_timeout calculation
Commit 528222d ("media: rc: harmonize infrared durations to microseconds") missed to switch the min_timeout calculation from ns to us. This resulted in a minimum timeout of 1.2 seconds instead of 1.2ms, leading to large delays and long key repeats. Fix this by applying proper ns->us conversion. Cc: stable@vger.kernel.org Fixes: 528222d ("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>
1 parent 9eb09dc commit e1def45

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/media/rc/ite-cir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id
15511551
rdev->s_rx_carrier_range = ite_set_rx_carrier_range;
15521552
/* FIFO threshold is 17 bytes, so 17 * 8 samples minimum */
15531553
rdev->min_timeout = 17 * 8 * ITE_BAUDRATE_DIVISOR *
1554-
itdev->params.sample_period;
1554+
itdev->params.sample_period / 1000;
15551555
rdev->timeout = IR_DEFAULT_TIMEOUT;
15561556
rdev->max_timeout = 10 * IR_DEFAULT_TIMEOUT;
15571557
rdev->rx_resolution = ITE_BAUDRATE_DIVISOR *

0 commit comments

Comments
 (0)