media: mceusb: set timeout to at least timeout provided
Subsystems (3)
Sean Young
maintainerPATCH 1/1 media: mceusb: set timeout to at least timeout provided
By rounding down, we can set a timeout value which reports spaces less than the timeout as a timeout rather than a space.
Fixes 877f1a7cee3f ("media: rc: mceusb: allow the timeout to be configurable")
Signed-off-by Sean Young <[email protected]>
--- drivers/media/rc/mceusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/rc/mceusb.c +1 -1
@@ -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;
Signature · 1 line
2.37.2