Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c39c1f...
Commit: c39c1fd29373d204b11b71946d0f4c97e4974dd9
Parent: 59d27521c0f50fadf3382e2b325a7e8a04d9a770
Author: Michael Krufky <mkrufky@linuxtv.org>
AuthorDate: Sat Jul 26 12:06:57 2008 -0300
Committer: Mauro Carvalho Chehab <mchehab@infradead.org>
CommitDate: Sun Jul 27 11:07:33 2008 -0300
V4L/DVB (8531): mxl5007t: move i2c gate handling outside of mutex protected code blocks
There is no reason to protect the i2c gate handling within the mxl5007t
state mutex.
Thanks to Steven Toth for pointing this out.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---
drivers/media/common/tuners/mxl5007t.c | 45 +++++++++++++++++---------------
1 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/drivers/media/common/tuners/mxl5007t.c b/drivers/media/common/tuners/mxl5007t.c
index f3b193a..4a1ea54 100644
--- a/drivers/media/common/tuners/mxl5007t.c
+++ b/drivers/media/common/tuners/mxl5007t.c
@@ -660,11 +660,11 @@ static int mxl5007t_get_status(struct dvb_frontend *fe, u32 *status)
s32 rf_input_level;
int ret;
- mutex_lock(&state->lock);
-
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1);
+ mutex_lock(&state->lock);
+
ret = mxl5007t_synth_lock_status(state, &rf_locked, &ref_locked);
if (mxl_fail(ret))
goto fail;
@@ -676,10 +676,11 @@ static int mxl5007t_get_status(struct dvb_frontend *fe, u32 *status)
goto fail;
mxl_debug("rf input power: %d", rf_input_level);
fail:
+ mutex_unlock(&state->lock);
+
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 0);
- mutex_unlock(&state->lock);
return ret;
}
@@ -730,11 +731,11 @@ static int mxl5007t_set_params(struct dvb_frontend *fe,
return -EINVAL;
}
- mutex_lock(&state->lock);
-
if (fe->ops.i2c_gate_ctrl)
...