Merge branch 'bugzilla-11715' into test
[sfrench/cifs-2.6.git] / drivers / media / common / tuners / mxl5005s.c
index 227642b044ae6b35f43aa902531911dc81ef1fa5..a8878244bb3c40432fe6b3420e32e338ae32f0ad 100644 (file)
@@ -3481,7 +3481,9 @@ static u16 MXL_ControlWrite_Group(struct dvb_frontend *fe, u16 controlNum,
                                        }
                                        ctrlVal = 0;
                                        for (k = 0; k < state->MXL_Ctrl[i].size; k++)
-                                               ctrlVal += state->MXL_Ctrl[i].val[k] * (1 << k);
+                                               ctrlVal += state->
+                                                       MXL_Ctrl[i].val[k] *
+                                                       (1 << k);
                                } else
                                        return -1;
                        }
@@ -3581,7 +3583,7 @@ static void MXL_RegWriteBit(struct dvb_frontend *fe, u8 address, u8 bit,
 
 static u32 MXL_Ceiling(u32 value, u32 resolution)
 {
-       return (value/resolution + (value % resolution > 0 ? 1 : 0));
+       return value / resolution + (value % resolution > 0 ? 1 : 0);
 }
 
 /* Retrieve the Initialzation Registers */
@@ -3910,7 +3912,10 @@ static int mxl5005s_writeregs(struct dvb_frontend *fe, u8 *addrtable,
 
 static int mxl5005s_init(struct dvb_frontend *fe)
 {
+       struct mxl5005s_state *state = fe->tuner_priv;
+
        dprintk(1, "%s()\n", __func__);
+       state->current_mode = MXL_QAM;
        return mxl5005s_reconfigure(fe, MXL_QAM, MXL5005S_BANDWIDTH_6MHZ);
 }
 
@@ -4092,7 +4097,6 @@ struct dvb_frontend *mxl5005s_attach(struct dvb_frontend *fe,
        state->frontend = fe;
        state->config = config;
        state->i2c = i2c;
-       state->current_mode = MXL_QAM;
 
        printk(KERN_INFO "MXL5005S: Attached at address 0x%02x\n",
                config->i2c_address);