aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/ttpci/budget-ci.c
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@linuxtv.org>2005-09-09 16:02:30 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 16:57:38 -0400
commitcfbfce1566f11c0dbad8a16173f0448b0c78cecb (patch)
treecd090616b3a13c130b72238f92390761bda71e39 /drivers/media/dvb/ttpci/budget-ci.c
parent4ff4ac1beae58a2fea7ec2ad43d6c3b60d90ec61 (diff)
[PATCH] dvb: frontend: stv0299: pass i2c bus to pll callback
Pass a pointer to the i2c bus to the pll callbacks (stv0299 only). It was not possible to tell which i2c bus should be used if an adapter has multiple frontends on multiple i2c buses. Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Johannes Stezenbach <js@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/dvb/ttpci/budget-ci.c')
-rw-r--r--drivers/media/dvb/ttpci/budget-ci.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c
index a1267054bc01..88f27a532163 100644
--- a/drivers/media/dvb/ttpci/budget-ci.c
+++ b/drivers/media/dvb/ttpci/budget-ci.c
@@ -548,9 +548,8 @@ static int alps_bsru6_set_symbol_rate(struct dvb_frontend *fe, u32 srate, u32 ra
548 return 0; 548 return 0;
549} 549}
550 550
551static int alps_bsru6_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) 551static int alps_bsru6_pll_set(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dvb_frontend_parameters *params)
552{ 552{
553 struct budget_ci *budget_ci = (struct budget_ci *) fe->dvb->priv;
554 u8 buf[4]; 553 u8 buf[4];
555 u32 div; 554 u32 div;
556 struct i2c_msg msg = {.addr = 0x61,.flags = 0,.buf = buf,.len = sizeof(buf) }; 555 struct i2c_msg msg = {.addr = 0x61,.flags = 0,.buf = buf,.len = sizeof(buf) };
@@ -567,7 +566,7 @@ static int alps_bsru6_pll_set(struct dvb_frontend *fe, struct dvb_frontend_param
567 if (params->frequency > 1530000) 566 if (params->frequency > 1530000)
568 buf[3] = 0xc0; 567 buf[3] = 0xc0;
569 568
570 if (i2c_transfer(&budget_ci->budget.i2c_adap, &msg, 1) != 1) 569 if (i2c_transfer(i2c, &msg, 1) != 1)
571 return -EIO; 570 return -EIO;
572 return 0; 571 return 0;
573} 572}
@@ -669,9 +668,9 @@ static int philips_su1278_tt_set_symbol_rate(struct dvb_frontend *fe, u32 srate,
669} 668}
670 669
671static int philips_su1278_tt_pll_set(struct dvb_frontend *fe, 670static int philips_su1278_tt_pll_set(struct dvb_frontend *fe,
671 struct i2c_adapter *i2c,
672 struct dvb_frontend_parameters *params) 672 struct dvb_frontend_parameters *params)
673{ 673{
674 struct budget_ci *budget_ci = (struct budget_ci *) fe->dvb->priv;
675 u32 div; 674 u32 div;
676 u8 buf[4]; 675 u8 buf[4];
677 struct i2c_msg msg = {.addr = 0x60,.flags = 0,.buf = buf,.len = sizeof(buf) }; 676 struct i2c_msg msg = {.addr = 0x60,.flags = 0,.buf = buf,.len = sizeof(buf) };
@@ -697,7 +696,7 @@ static int philips_su1278_tt_pll_set(struct dvb_frontend *fe,
697 else if (params->frequency < 2150000) 696 else if (params->frequency < 2150000)
698 buf[3] |= 0xC0; 697 buf[3] |= 0xC0;
699 698
700 if (i2c_transfer(&budget_ci->budget.i2c_adap, &msg, 1) != 1) 699 if (i2c_transfer(i2c, &msg, 1) != 1)
701 return -EIO; 700 return -EIO;
702 return 0; 701 return 0;
703} 702}