aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/rc/mceusb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
index 06dfe0957b5e..b928a61736d7 100644
--- a/drivers/media/rc/mceusb.c
+++ b/drivers/media/rc/mceusb.c
@@ -558,9 +558,10 @@ static void mceusb_dev_printdata(struct mceusb_dev *ir, char *buf,
558 inout, data1); 558 inout, data1);
559 break; 559 break;
560 case MCE_CMD_S_TIMEOUT: 560 case MCE_CMD_S_TIMEOUT:
561 /* value is in units of 50us, so x*50/100 or x/2 ms */ 561 /* value is in units of 50us, so x*50/1000 ms */
562 dev_info(dev, "%s receive timeout of %d ms\n", 562 dev_info(dev, "%s receive timeout of %d ms\n",
563 inout, ((data1 << 8) | data2) / 2); 563 inout,
564 ((data1 << 8) | data2) * MCE_TIME_UNIT / 1000);
564 break; 565 break;
565 case MCE_CMD_G_TIMEOUT: 566 case MCE_CMD_G_TIMEOUT:
566 dev_info(dev, "Get receive timeout\n"); 567 dev_info(dev, "Get receive timeout\n");
@@ -847,7 +848,7 @@ static void mceusb_handle_command(struct mceusb_dev *ir, int index)
847 switch (ir->buf_in[index]) { 848 switch (ir->buf_in[index]) {
848 /* 2-byte return value commands */ 849 /* 2-byte return value commands */
849 case MCE_CMD_S_TIMEOUT: 850 case MCE_CMD_S_TIMEOUT:
850 ir->rc->timeout = US_TO_NS((hi << 8 | lo) / 2); 851 ir->rc->timeout = US_TO_NS((hi << 8 | lo) * MCE_TIME_UNIT);
851 break; 852 break;
852 853
853 /* 1-byte return value commands */ 854 /* 1-byte return value commands */