diff options
Diffstat (limited to 'drivers/media/rc/nuvoton-cir.c')
-rw-r--r-- | drivers/media/rc/nuvoton-cir.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c index dd4caf8ef80b..273d9d674792 100644 --- a/drivers/media/rc/nuvoton-cir.c +++ b/drivers/media/rc/nuvoton-cir.c | |||
@@ -460,7 +460,7 @@ static u32 nvt_rx_carrier_detect(struct nvt_dev *nvt) | |||
460 | return 0; | 460 | return 0; |
461 | } | 461 | } |
462 | 462 | ||
463 | carrier = (count * 1000000) / duration; | 463 | carrier = MS_TO_NS(count) / duration; |
464 | 464 | ||
465 | if ((carrier > MAX_CARRIER) || (carrier < MIN_CARRIER)) | 465 | if ((carrier > MAX_CARRIER) || (carrier < MIN_CARRIER)) |
466 | nvt_dbg("WTF? Carrier frequency out of range!"); | 466 | nvt_dbg("WTF? Carrier frequency out of range!"); |
@@ -612,8 +612,8 @@ static void nvt_process_rx_ir_data(struct nvt_dev *nvt) | |||
612 | sample = nvt->buf[i]; | 612 | sample = nvt->buf[i]; |
613 | 613 | ||
614 | rawir.pulse = ((sample & BUF_PULSE_BIT) != 0); | 614 | rawir.pulse = ((sample & BUF_PULSE_BIT) != 0); |
615 | rawir.duration = (sample & BUF_LEN_MASK) | 615 | rawir.duration = US_TO_NS((sample & BUF_LEN_MASK) |
616 | * SAMPLE_PERIOD * 1000; | 616 | * SAMPLE_PERIOD); |
617 | 617 | ||
618 | if ((sample & BUF_LEN_MASK) == BUF_LEN_MASK) { | 618 | if ((sample & BUF_LEN_MASK) == BUF_LEN_MASK) { |
619 | if (nvt->rawir.pulse == rawir.pulse) | 619 | if (nvt->rawir.pulse == rawir.pulse) |