Tested by compilation only.

Signed-off-by: Peter Senna Tschudin <peter.se...@gmail.com>
---
 drivers/media/rc/nuvoton-cir.c |   37 -------------------------------------
 1 file changed, 37 deletions(-)

diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index dc8a7dd..0e8052f 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/drivers/media/rc/nuvoton-cir.c
@@ -473,39 +473,6 @@ static void nvt_enable_wake(struct nvt_dev *nvt)
        nvt_cir_wake_reg_write(nvt, 0, CIR_WAKE_IREN);
 }
 
-/* rx carrier detect only works in learning mode, must be called w/nvt_lock */
-static u32 nvt_rx_carrier_detect(struct nvt_dev *nvt)
-{
-       u32 count, carrier, duration = 0;
-       int i;
-
-       count = nvt_cir_reg_read(nvt, CIR_FCCL) |
-               nvt_cir_reg_read(nvt, CIR_FCCH) << 8;
-
-       for (i = 0; i < nvt->pkts; i++) {
-               if (nvt->buf[i] & BUF_PULSE_BIT)
-                       duration += nvt->buf[i] & BUF_LEN_MASK;
-       }
-
-       duration *= SAMPLE_PERIOD;
-
-       if (!count || !duration) {
-               nvt_pr(KERN_NOTICE, "Unable to determine carrier! (c:%u, d:%u)",
-                      count, duration);
-               return 0;
-       }
-
-       carrier = MS_TO_NS(count) / duration;
-
-       if ((carrier > MAX_CARRIER) || (carrier < MIN_CARRIER))
-               nvt_dbg("WTF? Carrier frequency out of range!");
-
-       nvt_dbg("Carrier frequency: %u (count %u, duration %u)",
-               carrier, count, duration);
-
-       return carrier;
-}
-
 /*
  * set carrier frequency
  *
@@ -618,7 +585,6 @@ static void nvt_dump_rx_buf(struct nvt_dev *nvt)
 static void nvt_process_rx_ir_data(struct nvt_dev *nvt)
 {
        DEFINE_IR_RAW_EVENT(rawir);
-       u32 carrier;
        u8 sample;
        int i;
 
@@ -627,9 +593,6 @@ static void nvt_process_rx_ir_data(struct nvt_dev *nvt)
        if (debug)
                nvt_dump_rx_buf(nvt);
 
-       if (nvt->carrier_detect_enabled)
-               carrier = nvt_rx_carrier_detect(nvt);
-
        nvt_dbg_verbose("Processing buffer of len %d", nvt->pkts);
 
        init_ir_raw_event(&rawir);
-- 
1.7.10.2

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to