aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common/tuners/mxl5007t.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-07-26 14:43:17 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-27 10:07:35 -0400
commit74b9ef21162fd81d9de87319c4373f523e2869cd (patch)
tree2c6a4f202511838d328f7e8841744c38a4f24f9b /drivers/media/common/tuners/mxl5007t.c
parentc39c1fd29373d204b11b71946d0f4c97e4974dd9 (diff)
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>
Diffstat (limited to 'drivers/media/common/tuners/mxl5007t.c')
-rw-r--r--drivers/media/common/tuners/mxl5007t.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/media/common/tuners/mxl5007t.c b/drivers/media/common/tuners/mxl5007t.c
index 4a1ea5425850..cb25e43502fe 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)
663 if (fe->ops.i2c_gate_ctrl) 663 if (fe->ops.i2c_gate_ctrl)
664 fe->ops.i2c_gate_ctrl(fe, 1); 664 fe->ops.i2c_gate_ctrl(fe, 1);
665 665
666 mutex_lock(&state->lock);
667
668 ret = mxl5007t_synth_lock_status(state, &rf_locked, &ref_locked); 666 ret = mxl5007t_synth_lock_status(state, &rf_locked, &ref_locked);
669 if (mxl_fail(ret)) 667 if (mxl_fail(ret))
670 goto fail; 668 goto fail;
@@ -676,8 +674,6 @@ static int mxl5007t_get_status(struct dvb_frontend *fe, u32 *status)
676 goto fail; 674 goto fail;
677 mxl_debug("rf input power: %d", rf_input_level); 675 mxl_debug("rf input power: %d", rf_input_level);
678fail: 676fail:
679 mutex_unlock(&state->lock);
680
681 if (fe->ops.i2c_gate_ctrl) 677 if (fe->ops.i2c_gate_ctrl)
682 fe->ops.i2c_gate_ctrl(fe, 0); 678 fe->ops.i2c_gate_ctrl(fe, 0);
683 679
@@ -839,8 +835,6 @@ static int mxl5007t_init(struct dvb_frontend *fe)
839 if (fe->ops.i2c_gate_ctrl) 835 if (fe->ops.i2c_gate_ctrl)
840 fe->ops.i2c_gate_ctrl(fe, 1); 836 fe->ops.i2c_gate_ctrl(fe, 1);
841 837
842 mutex_lock(&state->lock);
843
844 ret = mxl5007t_read_reg(state, 0x05, &d); 838 ret = mxl5007t_read_reg(state, 0x05, &d);
845 if (mxl_fail(ret)) 839 if (mxl_fail(ret))
846 goto fail; 840 goto fail;
@@ -848,8 +842,6 @@ static int mxl5007t_init(struct dvb_frontend *fe)
848 ret = mxl5007t_write_reg(state, 0x05, d | 0x01); 842 ret = mxl5007t_write_reg(state, 0x05, d | 0x01);
849 mxl_fail(ret); 843 mxl_fail(ret);
850fail: 844fail:
851 mutex_unlock(&state->lock);
852
853 if (fe->ops.i2c_gate_ctrl) 845 if (fe->ops.i2c_gate_ctrl)
854 fe->ops.i2c_gate_ctrl(fe, 0); 846 fe->ops.i2c_gate_ctrl(fe, 0);
855 847
@@ -865,8 +857,6 @@ static int mxl5007t_sleep(struct dvb_frontend *fe)
865 if (fe->ops.i2c_gate_ctrl) 857 if (fe->ops.i2c_gate_ctrl)
866 fe->ops.i2c_gate_ctrl(fe, 1); 858 fe->ops.i2c_gate_ctrl(fe, 1);
867 859
868 mutex_lock(&state->lock);
869
870 ret = mxl5007t_read_reg(state, 0x05, &d); 860 ret = mxl5007t_read_reg(state, 0x05, &d);
871 if (mxl_fail(ret)) 861 if (mxl_fail(ret))
872 goto fail; 862 goto fail;
@@ -874,8 +864,6 @@ static int mxl5007t_sleep(struct dvb_frontend *fe)
874 ret = mxl5007t_write_reg(state, 0x05, d & ~0x01); 864 ret = mxl5007t_write_reg(state, 0x05, d & ~0x01);
875 mxl_fail(ret); 865 mxl_fail(ret);
876fail: 866fail:
877 mutex_unlock(&state->lock);
878
879 if (fe->ops.i2c_gate_ctrl) 867 if (fe->ops.i2c_gate_ctrl)
880 fe->ops.i2c_gate_ctrl(fe, 0); 868 fe->ops.i2c_gate_ctrl(fe, 0);
881 869
@@ -1001,12 +989,8 @@ struct dvb_frontend *mxl5007t_attach(struct dvb_frontend *fe,
1001 if (fe->ops.i2c_gate_ctrl) 989 if (fe->ops.i2c_gate_ctrl)
1002 fe->ops.i2c_gate_ctrl(fe, 1); 990 fe->ops.i2c_gate_ctrl(fe, 1);
1003 991
1004 mutex_lock(&state->lock);
1005
1006 ret = mxl5007t_get_chip_id(state); 992 ret = mxl5007t_get_chip_id(state);
1007 993
1008 mutex_unlock(&state->lock);
1009
1010 if (fe->ops.i2c_gate_ctrl) 994 if (fe->ops.i2c_gate_ctrl)
1011 fe->ops.i2c_gate_ctrl(fe, 0); 995 fe->ops.i2c_gate_ctrl(fe, 0);
1012 996