aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/ttpci/av7110.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/av7110.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/av7110.c')
-rw-r--r--drivers/media/dvb/ttpci/av7110.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index e4c6e87f6c5d..c91cf8958b38 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -1668,9 +1668,8 @@ static int alps_bsru6_set_symbol_rate(struct dvb_frontend* fe, u32 srate, u32 ra
1668 return 0; 1668 return 0;
1669} 1669}
1670 1670
1671static int alps_bsru6_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) 1671static int alps_bsru6_pll_set(struct dvb_frontend* fe, struct i2c_adapter *i2c, struct dvb_frontend_parameters* params)
1672{ 1672{
1673 struct av7110* av7110 = (struct av7110*) fe->dvb->priv;
1674 int ret; 1673 int ret;
1675 u8 data[4]; 1674 u8 data[4];
1676 u32 div; 1675 u32 div;
@@ -1687,7 +1686,7 @@ static int alps_bsru6_pll_set(struct dvb_frontend* fe, struct dvb_frontend_param
1687 1686
1688 if (params->frequency > 1530000) data[3] = 0xc0; 1687 if (params->frequency > 1530000) data[3] = 0xc0;
1689 1688
1690 ret = i2c_transfer(&av7110->i2c_adap, &msg, 1); 1689 ret = i2c_transfer(i2c, &msg, 1);
1691 if (ret != 1) 1690 if (ret != 1)
1692 return -EIO; 1691 return -EIO;
1693 return 0; 1692 return 0;
@@ -1751,9 +1750,8 @@ static u8 alps_bsbe1_inittab[] = {
1751 0xff, 0xff 1750 0xff, 0xff
1752}; 1751};
1753 1752
1754static int alps_bsbe1_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) 1753static int alps_bsbe1_pll_set(struct dvb_frontend* fe, struct i2c_adapter *i2c, struct dvb_frontend_parameters* params)
1755{ 1754{
1756 struct av7110* av7110 = (struct av7110*) fe->dvb->priv;
1757 int ret; 1755 int ret;
1758 u8 data[4]; 1756 u8 data[4];
1759 u32 div; 1757 u32 div;
@@ -1768,7 +1766,7 @@ static int alps_bsbe1_pll_set(struct dvb_frontend* fe, struct dvb_frontend_param
1768 data[2] = 0x80 | ((div & 0x18000) >> 10) | 4; 1766 data[2] = 0x80 | ((div & 0x18000) >> 10) | 4;
1769 data[3] = (params->frequency > 1530000) ? 0xE0 : 0xE4; 1767 data[3] = (params->frequency > 1530000) ? 0xE0 : 0xE4;
1770 1768
1771 ret = i2c_transfer(&av7110->i2c_adap, &msg, 1); 1769 ret = i2c_transfer(i2c, &msg, 1);
1772 return (ret != 1) ? -EIO : 0; 1770 return (ret != 1) ? -EIO : 0;
1773} 1771}
1774 1772