diff options
Diffstat (limited to 'drivers/media/video/cx88/cx88-i2c.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-i2c.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/drivers/media/video/cx88/cx88-i2c.c b/drivers/media/video/cx88/cx88-i2c.c index 1ab691d20692..c0ff2305d804 100644 --- a/drivers/media/video/cx88/cx88-i2c.c +++ b/drivers/media/video/cx88/cx88-i2c.c | |||
@@ -116,30 +116,16 @@ static int detach_inform(struct i2c_client *client) | |||
116 | 116 | ||
117 | void cx88_call_i2c_clients(struct cx88_core *core, unsigned int cmd, void *arg) | 117 | void cx88_call_i2c_clients(struct cx88_core *core, unsigned int cmd, void *arg) |
118 | { | 118 | { |
119 | #if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) | ||
120 | struct videobuf_dvb_frontends *f = &core->dvbdev->frontends; | ||
121 | struct videobuf_dvb_frontend *fe = NULL; | ||
122 | #endif | ||
123 | if (0 != core->i2c_rc) | 119 | if (0 != core->i2c_rc) |
124 | return; | 120 | return; |
125 | 121 | ||
126 | #if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) | 122 | if (core->gate_ctrl) |
127 | if (core->dvbdev && f) { | 123 | core->gate_ctrl(core, 1); |
128 | if(f->gate <= 1) /* undefined or fe0 */ | ||
129 | fe = videobuf_dvb_get_frontend(f, 1); | ||
130 | else | ||
131 | fe = videobuf_dvb_get_frontend(f, f->gate); | ||
132 | 124 | ||
133 | if (fe && fe->dvb.frontend && fe->dvb.frontend->ops.i2c_gate_ctrl) | 125 | i2c_clients_command(&core->i2c_adap, cmd, arg); |
134 | fe->dvb.frontend->ops.i2c_gate_ctrl(fe->dvb.frontend, 1); | ||
135 | 126 | ||
136 | i2c_clients_command(&core->i2c_adap, cmd, arg); | 127 | if (core->gate_ctrl) |
137 | 128 | core->gate_ctrl(core, 0); | |
138 | if (fe && fe->dvb.frontend && fe->dvb.frontend->ops.i2c_gate_ctrl) | ||
139 | fe->dvb.frontend->ops.i2c_gate_ctrl(fe->dvb.frontend, 0); | ||
140 | } else | ||
141 | #endif | ||
142 | i2c_clients_command(&core->i2c_adap, cmd, arg); | ||
143 | } | 129 | } |
144 | 130 | ||
145 | static const struct i2c_algo_bit_data cx8800_i2c_algo_template = { | 131 | static const struct i2c_algo_bit_data cx8800_i2c_algo_template = { |