Merge git://oak/home/sfr/kernels/iseries/work
[firefly-linux-kernel-4.4.55.git] / drivers / media / dvb / ttusb-budget / dvb-ttusb-budget.c
index c1acd4bb34992b0cabcaba1689e9a7ef33d45398..fd53d6010502fa54d108769b06ea01060da92772 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/delay.h>
 #include <linux/time.h>
 #include <linux/errno.h>
+#include <linux/jiffies.h>
 #include <asm/semaphore.h>
 
 #include "dvb_frontend.h"
@@ -570,7 +571,8 @@ static void ttusb_handle_sec_data(struct ttusb_channel *channel,
                                  const u8 * data, int len);
 #endif
 
-static int numpkt = 0, lastj, numts, numstuff, numsec, numinvalid;
+static int numpkt = 0, numts, numstuff, numsec, numinvalid;
+static unsigned long lastj;
 
 static void ttusb_process_muxpack(struct ttusb *ttusb, const u8 * muxpack,
                           int len)
@@ -779,7 +781,7 @@ static void ttusb_iso_irq(struct urb *urb, struct pt_regs *ptregs)
                        u8 *data;
                        int len;
                        numpkt++;
-                       if ((jiffies - lastj) >= HZ) {
+                       if (time_after_eq(jiffies, lastj + HZ)) {
 #if DEBUG > 2
                                printk
                                    ("frames/s: %d (ts: %d, stuff %d, sec: %d, invalid: %d, all: %d)\n",
@@ -1196,7 +1198,7 @@ static u8 alps_bsbe1_inittab[] = {
         0x0e, 0x23,             /* alpha_tmg = 2, beta_tmg = 3 */
         0x10, 0x3f,             // AGC2  0x3d
         0x11, 0x84,
-        0x12, 0xb5,             // Lock detect: -64  Carrier freq detect:on
+        0x12, 0xb9,
         0x15, 0xc9,             // lock detector threshold
         0x16, 0x00,
         0x17, 0x00,
@@ -1238,7 +1240,7 @@ static u8 alps_bsru6_inittab[] = {
        0x0e, 0x23,             /* alpha_tmg = 2, beta_tmg = 3 */
        0x10, 0x3f,             // AGC2  0x3d
        0x11, 0x84,
-       0x12, 0xb5,             // Lock detect: -64  Carrier freq detect:on
+       0x12, 0xb9,
        0x15, 0xc9,             // lock detector threshold
        0x16, 0x00,
        0x17, 0x00,
@@ -1333,7 +1335,6 @@ static struct stv0299_config alps_stv0299_config = {
        .inittab = alps_bsru6_inittab,
        .mclk = 88000000UL,
        .invert = 1,
-       .enhanced_tuning = 0,
        .skip_reinit = 0,
        .lock_output = STV0229_LOCKOUTPUT_1,
        .volt13_op0_op1 = STV0299_VOLT13_OP1,