diff options
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/frontends/dvb-pll.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/dvb-pll.c b/drivers/media/dvb/frontends/dvb-pll.c index a189683454b7..b9a338875948 100644 --- a/drivers/media/dvb/frontends/dvb-pll.c +++ b/drivers/media/dvb/frontends/dvb-pll.c | |||
@@ -613,7 +613,20 @@ static struct dvb_tuner_ops dvb_pll_tuner_ops = { | |||
613 | 613 | ||
614 | int dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, struct i2c_adapter *i2c, struct dvb_pll_desc *desc) | 614 | int dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, struct i2c_adapter *i2c, struct dvb_pll_desc *desc) |
615 | { | 615 | { |
616 | u8 b1 [] = { 0 }; | ||
617 | struct i2c_msg msg [] = { { .addr = pll_addr, .flags = 0, .buf = NULL, .len = 0 }, | ||
618 | { .addr = pll_addr, .flags = I2C_M_RD, .buf = b1, .len = 1 } }; | ||
616 | struct dvb_pll_priv *priv = NULL; | 619 | struct dvb_pll_priv *priv = NULL; |
620 | int ret; | ||
621 | |||
622 | if (fe->ops.i2c_gate_ctrl) | ||
623 | fe->ops.i2c_gate_ctrl(fe, 1); | ||
624 | |||
625 | ret = i2c_transfer (i2c, msg, 2); | ||
626 | if (ret != 2) | ||
627 | return -1; | ||
628 | if (fe->ops.i2c_gate_ctrl) | ||
629 | fe->ops.i2c_gate_ctrl(fe, 0); | ||
617 | 630 | ||
618 | priv = kzalloc(sizeof(struct dvb_pll_priv), GFP_KERNEL); | 631 | priv = kzalloc(sizeof(struct dvb_pll_priv), GFP_KERNEL); |
619 | if (priv == NULL) | 632 | if (priv == NULL) |