summaryrefslogtreecommitdiff
path: root/linux/drivers/media/common
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-07-26 14:43:17 -0400
committerMichael Krufky <mkrufky@linuxtv.org>2008-07-26 14:43:17 -0400
commit77b963e9fbc0911412eb7b86df83d976f81abf2d (patch)
treef12e7e9d4f2ee654763a2e4476c1c2ac48a12ae9 /linux/drivers/media/common
parente3a2c9f318da42e472341ef31a8d11864d772a0a (diff)
downloadmediapointer-dvb-s2-77b963e9fbc0911412eb7b86df83d976f81abf2d.tar.gz
mediapointer-dvb-s2-77b963e9fbc0911412eb7b86df83d976f81abf2d.tar.bz2
mxl5007t: remove excessive locks
From: Michael Krufky <mkrufky@linuxtv.org> The use of mutex locking is overly paranoid in this driver. The only locks we need are around the manipulation of the register arrays. The other locks are not needed - remove them. Thanks to Steven Toth for pointing this out. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/common')
-rw-r--r--linux/drivers/media/common/tuners/mxl5007t.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/linux/drivers/media/common/tuners/mxl5007t.c b/linux/drivers/media/common/tuners/mxl5007t.c
index 9fa8d82b2..e795650c2 100644
--- a/linux/drivers/media/common/tuners/mxl5007t.c
+++ b/linux/drivers/media/common/tuners/mxl5007t.c
@@ -668,8 +668,6 @@ static int mxl5007t_get_status(struct dvb_frontend *fe, u32 *status)
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;
@@ -681,8 +679,6 @@ 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);
@@ -851,8 +847,6 @@ static int mxl5007t_init(struct dvb_frontend *fe)
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1);
- mutex_lock(&state->lock);
-
ret = mxl5007t_read_reg(state, 0x05, &d);
if (mxl_fail(ret))
goto fail;
@@ -860,8 +854,6 @@ static int mxl5007t_init(struct dvb_frontend *fe)
ret = mxl5007t_write_reg(state, 0x05, d | 0x01);
mxl_fail(ret);
fail:
- mutex_unlock(&state->lock);
-
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 0);
@@ -877,8 +869,6 @@ static int mxl5007t_sleep(struct dvb_frontend *fe)
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1);
- mutex_lock(&state->lock);
-
ret = mxl5007t_read_reg(state, 0x05, &d);
if (mxl_fail(ret))
goto fail;
@@ -886,8 +876,6 @@ static int mxl5007t_sleep(struct dvb_frontend *fe)
ret = mxl5007t_write_reg(state, 0x05, d & ~0x01);
mxl_fail(ret);
fail:
- mutex_unlock(&state->lock);
-
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 0);
@@ -1023,12 +1011,8 @@ struct dvb_frontend *mxl5007t_attach(struct dvb_frontend *fe,
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1);
- mutex_lock(&state->lock);
-
ret = mxl5007t_get_chip_id(state);
- mutex_unlock(&state->lock);
-
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 0);