]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/media/dvb/frontends/cx24110.c
V4L/DVB (4028): Change dvb_frontend_ops to be a real field instead of a pointer field...
[mirror_ubuntu-artful-kernel.git] / drivers / media / dvb / frontends / cx24110.c
index 8d98ffb61e4e44a64a0c23ec3d73eaf6ebfedbed..ce3c7398bac9ffa74168145b9b67d4eccf519c02 100644 (file)
@@ -36,8 +36,6 @@ struct cx24110_state {
 
        struct i2c_adapter* i2c;
 
-       struct dvb_frontend_ops ops;
-
        const struct cx24110_config* config;
 
        struct dvb_frontend frontend;
@@ -538,9 +536,9 @@ static int cx24110_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
        struct cx24110_state *state = fe->demodulator_priv;
 
 
-       if (fe->ops->tuner_ops.set_params) {
-               fe->ops->tuner_ops.set_params(fe, p);
-               if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0);
+       if (fe->ops.tuner_ops.set_params) {
+               fe->ops.tuner_ops.set_params(fe, p);
+               if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
        }
 
        cx24110_set_inversion (state, p->inversion);
@@ -606,7 +604,6 @@ struct dvb_frontend* cx24110_attach(const struct cx24110_config* config,
        /* setup the state */
        state->config = config;
        state->i2c = i2c;
-       memcpy(&state->ops, &cx24110_ops, sizeof(struct dvb_frontend_ops));
        state->lastber = 0;
        state->lastbler = 0;
        state->lastesn0 = 0;
@@ -616,7 +613,7 @@ struct dvb_frontend* cx24110_attach(const struct cx24110_config* config,
        if ((ret != 0x5a) && (ret != 0x69)) goto error;
 
        /* create dvb_frontend */
-       state->frontend.ops = &state->ops;
+       memcpy(&state->frontend.ops, &cx24110_ops, sizeof(struct dvb_frontend_ops));
        state->frontend.demodulator_priv = state;
        return &state->frontend;