mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
media: mceusb: set timeout to at least timeout provided
By rounding down, the actual timeout can be lower than requested. As a
result, long spaces just below the requested timeout can be incorrectly
reported as timeout and truncated.
Fixes: 877f1a7cee
("media: rc: mceusb: allow the timeout to be configurable")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
2dfe2c4f17
commit
20b794ddce
1 changed files with 1 additions and 1 deletions
|
@ -1077,7 +1077,7 @@ static int mceusb_set_timeout(struct rc_dev *dev, unsigned int timeout)
|
|||
struct mceusb_dev *ir = dev->priv;
|
||||
unsigned int units;
|
||||
|
||||
units = DIV_ROUND_CLOSEST(timeout, MCE_TIME_UNIT);
|
||||
units = DIV_ROUND_UP(timeout, MCE_TIME_UNIT);
|
||||
|
||||
cmdbuf[2] = units >> 8;
|
||||
cmdbuf[3] = units;
|
||||
|
|
Loading…
Reference in a new issue