aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/stb6100.c
diff options
context:
space:
mode:
authorManu Abraham <abraham.manu@gmail.com>2008-02-03 17:37:02 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 14:53:23 -0500
commit40e8ce3dba8e9437ed48c88c268615dc0a4bebb2 (patch)
treeb5588068dfd4ff2e7a16c420f98110a5be6ce711 /drivers/media/dvb/frontends/stb6100.c
parented3d150eacfa87087f705a908a2586bdec5bf9b7 (diff)
V4L/DVB (9457): Optimization, Fix a Bug
* cut down some I/O operations by disabling "disable gate" * budget_av was left with the gate open, thereby more susceptible to RF interference due to I/O operations Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/stb6100.c')
-rw-r--r--drivers/media/dvb/frontends/stb6100.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/media/dvb/frontends/stb6100.c b/drivers/media/dvb/frontends/stb6100.c
index c8fdc1e99df1..f404a4d0fb17 100644
--- a/drivers/media/dvb/frontends/stb6100.c
+++ b/drivers/media/dvb/frontends/stb6100.c
@@ -134,16 +134,7 @@ static int stb6100_read_regs(struct stb6100_state *state, u8 regs[])
134 .len = STB6100_NUMREGS 134 .len = STB6100_NUMREGS
135 }; 135 };
136 136
137 if (state->frontend->ops.i2c_gate_ctrl)
138 if ((rc = state->frontend->ops.i2c_gate_ctrl(state->frontend, 1)) < 0)
139 return rc;
140
141 rc = i2c_transfer(state->i2c, &msg, 1); 137 rc = i2c_transfer(state->i2c, &msg, 1);
142 if (state->frontend->ops.i2c_gate_ctrl) {
143 int rc2;
144 if ((rc2 = state->frontend->ops.i2c_gate_ctrl(state->frontend, 0)) < 0)
145 return rc2;
146 }
147 if (unlikely(rc != 1)) { 138 if (unlikely(rc != 1)) {
148 dprintk(verbose, FE_ERROR, 1, "Read (0x%x) err, rc=[%d]", 139 dprintk(verbose, FE_ERROR, 1, "Read (0x%x) err, rc=[%d]",
149 state->config->tuner_address, rc); 140 state->config->tuner_address, rc);
@@ -200,15 +191,7 @@ static int stb6100_write_reg_range(struct stb6100_state *state, u8 buf[], int st
200 for (i = 0; i < len; i++) 191 for (i = 0; i < len; i++)
201 dprintk(verbose, FE_DEBUG, 1, " %s: 0x%02x", stb6100_regnames[start + i], buf[i]); 192 dprintk(verbose, FE_DEBUG, 1, " %s: 0x%02x", stb6100_regnames[start + i], buf[i]);
202 } 193 }
203 if (state->frontend->ops.i2c_gate_ctrl)
204 if ((rc = state->frontend->ops.i2c_gate_ctrl(state->frontend, 1)) < 0)
205 return rc;
206 rc = i2c_transfer(state->i2c, &msg, 1); 194 rc = i2c_transfer(state->i2c, &msg, 1);
207 if (state->frontend->ops.i2c_gate_ctrl) {
208 int rc2;
209 if ((rc2 = state->frontend->ops.i2c_gate_ctrl(state->frontend, 0)) < 0)
210 return rc2;
211 }
212 if (unlikely(rc != 1)) { 195 if (unlikely(rc != 1)) {
213 dprintk(verbose, FE_ERROR, 1, "(0x%x) write err [%d:%d], rc=[%d]", 196 dprintk(verbose, FE_ERROR, 1, "(0x%x) write err [%d:%d], rc=[%d]",
214 (unsigned int)state->config->tuner_address, start, len, rc); 197 (unsigned int)state->config->tuner_address, start, len, rc);