Commit fd53744e authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] mb86a20s: Fix i2c gate on error

If an error happens, restore tuner I2C gate to the right
value.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent a77cfcac
...@@ -262,10 +262,10 @@ static int mb86a20s_initfe(struct dvb_frontend *fe) ...@@ -262,10 +262,10 @@ static int mb86a20s_initfe(struct dvb_frontend *fe)
goto err; goto err;
} }
err:
if (fe->ops.i2c_gate_ctrl) if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1); fe->ops.i2c_gate_ctrl(fe, 1);
err:
if (rc < 0) { if (rc < 0) {
state->need_init = true; state->need_init = true;
printk(KERN_INFO "mb86a20s: Init failed. Will try again later\n"); printk(KERN_INFO "mb86a20s: Init failed. Will try again later\n");
...@@ -363,6 +363,10 @@ static int mb86a20s_set_frontend(struct dvb_frontend *fe) ...@@ -363,6 +363,10 @@ static int mb86a20s_set_frontend(struct dvb_frontend *fe)
dprintk("\n"); dprintk("\n");
/*
* Gate should already be opened, but it doesn't hurt to
* double-check
*/
if (fe->ops.i2c_gate_ctrl) if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1); fe->ops.i2c_gate_ctrl(fe, 1);
dprintk("Calling tuner set parameters\n"); dprintk("Calling tuner set parameters\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment