summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorJose Alberto Reguero <jareguero@telefonica.net>2013-02-04 01:30:38 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-02-08 21:37:30 +0400
commit0a3237704dec476be3cdfbe8fc9df9cc65b14442 (patch)
tree46ac0a5e21fe7cb7f01b4072d4c5dcd4971291fa /drivers/media
parent47ebe3f93250fce6f4eaa16309ae5eee9d4099b3 (diff)
downloadlinux-0a3237704dec476be3cdfbe8fc9df9cc65b14442.tar.xz
[media] [PATH,1/2] mxl5007 move reset to attach
This patch move the soft reset to the attach function because with dual tuners, when one tuner do reset, the other one is perturbed, and the stream has errors. Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/tuners/mxl5007t.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/media/tuners/mxl5007t.c b/drivers/media/tuners/mxl5007t.c
index 69e453ef0a1a..eb61304c260d 100644
--- a/drivers/media/tuners/mxl5007t.c
+++ b/drivers/media/tuners/mxl5007t.c
@@ -531,10 +531,6 @@ static int mxl5007t_tuner_init(struct mxl5007t_state *state,
struct reg_pair_t *init_regs;
int ret;
- ret = mxl5007t_soft_reset(state);
- if (mxl_fail(ret))
- goto fail;
-
/* calculate initialization reg array */
init_regs = mxl5007t_calc_init_regs(state, mode);
@@ -900,7 +896,20 @@ struct dvb_frontend *mxl5007t_attach(struct dvb_frontend *fe,
/* existing tuner instance */
break;
}
+
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 1);
+
+ ret = mxl5007t_soft_reset(state);
+
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 0);
+
+ if (mxl_fail(ret))
+ goto fail;
+
fe->tuner_priv = state;
+
mutex_unlock(&mxl5007t_list_mutex);
memcpy(&fe->ops.tuner_ops, &mxl5007t_tuner_ops,