mb86a20s: fix the locking logic
[pandora-kernel.git] / drivers / media / dvb / frontends / mb86a20s.c
index 0f867a5..9deee56 100644 (file)
@@ -477,7 +477,11 @@ static int mb86a20s_read_status(struct dvb_frontend *fe, fe_status_t *status)
        if (val >= 7)
                *status |= FE_HAS_SYNC;
 
-       if (val >= 8)                           /* Maybe 9? */
+       /*
+        * Actually, on state S8, it starts receiving TS, but the TS
+        * output is only on normal state after the transition to S9.
+        */
+       if (val >= 9)
                *status |= FE_HAS_LOCK;
 
        dprintk("val = %d, status = 0x%02x\n", val, *status);
@@ -562,6 +566,11 @@ static void mb86a20s_release(struct dvb_frontend *fe)
        kfree(state);
 }
 
+static int mb86a20s_get_frontend_algo(struct dvb_frontend *fe)
+{
+        return DVBFE_ALGO_HW;
+}
+
 static struct dvb_frontend_ops mb86a20s_ops;
 
 struct dvb_frontend *mb86a20s_attach(const struct mb86a20s_config *config,
@@ -632,6 +641,7 @@ static struct dvb_frontend_ops mb86a20s_ops = {
        .read_status = mb86a20s_read_status,
        .read_signal_strength = mb86a20s_read_signal_strength,
        .tune = mb86a20s_tune,
+       .get_frontend_algo = mb86a20s_get_frontend_algo,
 };
 
 MODULE_DESCRIPTION("DVB Frontend module for Fujitsu mb86A20s hardware");