@@ -271,7 +271,7 @@ struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe,
const struct ix2505v_config *config,
struct i2c_adapter *i2c)
{
- struct ix2505v_state *state = NULL;
+ struct ix2505v_state *state;
int ret;
if (NULL == config) {
@@ -285,6 +285,7 @@ struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe,
state->config = config;
state->i2c = i2c;
+ fe->tuner_priv = state;
if (state->config->tuner_write_only) {
if (fe->ops.i2c_gate_ctrl)
@@ -301,8 +302,6 @@ struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe,
fe->ops.i2c_gate_ctrl(fe, 0);
}
- fe->tuner_priv = state;
-
memcpy(&fe->ops.tuner_ops, &ix2505v_tuner_ops,
sizeof(struct dvb_tuner_ops));
deb_i2c("%s: initialization (%s addr=0x%02x) ok\n",