V4L/DVB (8532): mxl5007t: remove excessive locks

Previous thread: V4L/DVB (8531): mxl5007t: move i2c gate handling outside of mutex protected code blocks by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:04 am. (1 message)

Next thread: V4L/DVB (8522): videodev2: Fix merge conflict by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:04 am. (1 message)
From: Linux Kernel Mailing List
Date: Monday, July 28, 2008 - 10:04 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=74b9ef...
Commit:     74b9ef21162fd81d9de87319c4373f523e2869cd
Parent:     c39c1fd29373d204b11b71946d0f4c97e4974dd9
Author:     Michael Krufky <mkrufky@linuxtv.org>
AuthorDate: Sat Jul 26 15:43:17 2008 -0300
Committer:  Mauro Carvalho Chehab <mchehab@infradead.org>
CommitDate: Sun Jul 27 11:07:35 2008 -0300

    V4L/DVB (8532): mxl5007t: remove excessive locks
    
    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>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---
 drivers/media/common/tuners/mxl5007t.c |   16 ----------------
 1 files changed, 0 insertions(+), 16 deletions(-)

diff --git a/drivers/media/common/tuners/mxl5007t.c b/drivers/media/common/tuners/mxl5007t.c
index 4a1ea54..cb25e43 100644
--- a/drivers/media/common/tuners/mxl5007t.c
+++ b/drivers/media/common/tuners/mxl5007t.c
@@ -663,8 +663,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;
@@ -676,8 +674,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);
 
@@ -839,8 +835,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;
@@ ...
Previous thread: V4L/DVB (8531): mxl5007t: move i2c gate handling outside of mutex protected code blocks by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:04 am. (1 message)

Next thread: V4L/DVB (8522): videodev2: Fix merge conflict by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:04 am. (1 message)