]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/cx88/cx88-i2c.c
Merge branch 'topic/aoa' into for-linus
[linux-2.6-omap-h63xx.git] / drivers / media / video / cx88 / cx88-i2c.c
index 01de23007095f5d7d1de4b8371df34f26b9d0795..c0ff2305d804bfb7761577c8371d43e27036ba15 100644 (file)
@@ -116,28 +116,16 @@ static int detach_inform(struct i2c_client *client)
 
 void cx88_call_i2c_clients(struct cx88_core *core, unsigned int cmd, void *arg)
 {
-       struct videobuf_dvb_frontends *f = &core->dvbdev->frontends;
-       struct videobuf_dvb_frontend *fe = NULL;
        if (0 != core->i2c_rc)
                return;
 
-#if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE)
-       if (core->dvbdev && f) {
-               if(f->gate <= 1) /* undefined or fe0 */
-                       fe = videobuf_dvb_get_frontend(f, 1);
-               else
-                       fe = videobuf_dvb_get_frontend(f, f->gate);
+       if (core->gate_ctrl)
+               core->gate_ctrl(core, 1);
 
-               if (fe && fe->dvb.frontend && fe->dvb.frontend->ops.i2c_gate_ctrl)
-                       fe->dvb.frontend->ops.i2c_gate_ctrl(fe->dvb.frontend, 1);
+       i2c_clients_command(&core->i2c_adap, cmd, arg);
 
-               i2c_clients_command(&core->i2c_adap, cmd, arg);
-
-               if (fe && fe->dvb.frontend && fe->dvb.frontend->ops.i2c_gate_ctrl)
-                       fe->dvb.frontend->ops.i2c_gate_ctrl(fe->dvb.frontend, 0);
-       } else
-#endif
-               i2c_clients_command(&core->i2c_adap, cmd, arg);
+       if (core->gate_ctrl)
+               core->gate_ctrl(core, 0);
 }
 
 static const struct i2c_algo_bit_data cx8800_i2c_algo_template = {