diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/frontends/dvb-pll.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/dvb/frontends/dvb-pll.c b/drivers/media/dvb/frontends/dvb-pll.c index 4c8a506479b4..2be33f27c69f 100644 --- a/drivers/media/dvb/frontends/dvb-pll.c +++ b/drivers/media/dvb/frontends/dvb-pll.c | |||
@@ -614,8 +614,7 @@ static struct dvb_tuner_ops dvb_pll_tuner_ops = { | |||
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 }; | 616 | u8 b1 [] = { 0 }; |
617 | struct i2c_msg msg [] = { { .addr = pll_addr, .flags = 0, .buf = NULL, .len = 0 }, | 617 | struct i2c_msg msg = { .addr = pll_addr, .flags = I2C_M_RD, .buf = b1, .len = 1 }; |
618 | { .addr = pll_addr, .flags = I2C_M_RD, .buf = b1, .len = 1 } }; | ||
619 | struct dvb_pll_priv *priv = NULL; | 618 | struct dvb_pll_priv *priv = NULL; |
620 | int ret; | 619 | int ret; |
621 | 620 | ||
@@ -623,8 +622,8 @@ int dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, struct i2c_adapter *i2 | |||
623 | if (fe->ops.i2c_gate_ctrl) | 622 | if (fe->ops.i2c_gate_ctrl) |
624 | fe->ops.i2c_gate_ctrl(fe, 1); | 623 | fe->ops.i2c_gate_ctrl(fe, 1); |
625 | 624 | ||
626 | ret = i2c_transfer (i2c, msg, 2); | 625 | ret = i2c_transfer (i2c, &msg, 1); |
627 | if (ret != 2) | 626 | if (ret != 1) |
628 | return -1; | 627 | return -1; |
629 | if (fe->ops.i2c_gate_ctrl) | 628 | if (fe->ops.i2c_gate_ctrl) |
630 | fe->ops.i2c_gate_ctrl(fe, 0); | 629 | fe->ops.i2c_gate_ctrl(fe, 0); |