aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/ttpci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/ttpci')
-rw-r--r--drivers/media/dvb/ttpci/av7110.c116
-rw-r--r--drivers/media/dvb/ttpci/budget-av.c56
-rw-r--r--drivers/media/dvb/ttpci/budget-ci.c54
-rw-r--r--drivers/media/dvb/ttpci/budget-patch.c36
-rw-r--r--drivers/media/dvb/ttpci/budget.c58
5 files changed, 160 insertions, 160 deletions
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index be0a04caf923..8832f80c05f7 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -1575,8 +1575,8 @@ static int alps_bsrv2_tuner_set_params(struct dvb_frontend* fe, struct dvb_front
1575 // NOTE: since we're using a prescaler of 2, we set the 1575 // NOTE: since we're using a prescaler of 2, we set the
1576 // divisor frequency to 62.5kHz and divide by 125 above 1576 // divisor frequency to 62.5kHz and divide by 125 above
1577 1577
1578 if (fe->ops->i2c_gate_ctrl) 1578 if (fe->ops.i2c_gate_ctrl)
1579 fe->ops->i2c_gate_ctrl(fe, 1); 1579 fe->ops.i2c_gate_ctrl(fe, 1);
1580 if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1) 1580 if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1)
1581 return -EIO; 1581 return -EIO;
1582 return 0; 1582 return 0;
@@ -1602,8 +1602,8 @@ static int alps_tdbe2_tuner_set_params(struct dvb_frontend* fe, struct dvb_front
1602 data[2] = 0x85 | ((div >> 10) & 0x60); 1602 data[2] = 0x85 | ((div >> 10) & 0x60);
1603 data[3] = (params->frequency < 174000000 ? 0x88 : params->frequency < 470000000 ? 0x84 : 0x81); 1603 data[3] = (params->frequency < 174000000 ? 0x88 : params->frequency < 470000000 ? 0x84 : 0x81);
1604 1604
1605 if (fe->ops->i2c_gate_ctrl) 1605 if (fe->ops.i2c_gate_ctrl)
1606 fe->ops->i2c_gate_ctrl(fe, 1); 1606 fe->ops.i2c_gate_ctrl(fe, 1);
1607 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) 1607 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1)
1608 return -EIO; 1608 return -EIO;
1609 return 0; 1609 return 0;
@@ -1632,8 +1632,8 @@ static int grundig_29504_451_tuner_set_params(struct dvb_frontend* fe, struct dv
1632 data[2] = 0x8e; 1632 data[2] = 0x8e;
1633 data[3] = 0x00; 1633 data[3] = 0x00;
1634 1634
1635 if (fe->ops->i2c_gate_ctrl) 1635 if (fe->ops.i2c_gate_ctrl)
1636 fe->ops->i2c_gate_ctrl(fe, 1); 1636 fe->ops.i2c_gate_ctrl(fe, 1);
1637 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) 1637 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1)
1638 return -EIO; 1638 return -EIO;
1639 return 0; 1639 return 0;
@@ -1660,8 +1660,8 @@ static int philips_cd1516_tuner_set_params(struct dvb_frontend* fe, struct dvb_f
1660 data[2] = 0x8e; 1660 data[2] = 0x8e;
1661 data[3] = (f < 174000000 ? 0xa1 : f < 470000000 ? 0x92 : 0x34); 1661 data[3] = (f < 174000000 ? 0xa1 : f < 470000000 ? 0x92 : 0x34);
1662 1662
1663 if (fe->ops->i2c_gate_ctrl) 1663 if (fe->ops.i2c_gate_ctrl)
1664 fe->ops->i2c_gate_ctrl(fe, 1); 1664 fe->ops.i2c_gate_ctrl(fe, 1);
1665 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) 1665 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1)
1666 return -EIO; 1666 return -EIO;
1667 return 0; 1667 return 0;
@@ -1695,8 +1695,8 @@ static int alps_tdlb7_tuner_set_params(struct dvb_frontend* fe, struct dvb_front
1695 data[2] = 0x85; 1695 data[2] = 0x85;
1696 data[3] = pwr << 6; 1696 data[3] = pwr << 6;
1697 1697
1698 if (fe->ops->i2c_gate_ctrl) 1698 if (fe->ops.i2c_gate_ctrl)
1699 fe->ops->i2c_gate_ctrl(fe, 1); 1699 fe->ops.i2c_gate_ctrl(fe, 1);
1700 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) 1700 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1)
1701 return -EIO; 1701 return -EIO;
1702 return 0; 1702 return 0;
@@ -1835,8 +1835,8 @@ static int nexusca_stv0297_tuner_set_params(struct dvb_frontend* fe, struct dvb_
1835 else 1835 else
1836 return -EINVAL; 1836 return -EINVAL;
1837 1837
1838 if (fe->ops->i2c_gate_ctrl) 1838 if (fe->ops.i2c_gate_ctrl)
1839 fe->ops->i2c_gate_ctrl(fe, 1); 1839 fe->ops.i2c_gate_ctrl(fe, 1);
1840 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) { 1840 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) {
1841 printk("nexusca: pll transfer failed!\n"); 1841 printk("nexusca: pll transfer failed!\n");
1842 return -EIO; 1842 return -EIO;
@@ -1844,8 +1844,8 @@ static int nexusca_stv0297_tuner_set_params(struct dvb_frontend* fe, struct dvb_
1844 1844
1845 // wait for PLL lock 1845 // wait for PLL lock
1846 for(i = 0; i < 20; i++) { 1846 for(i = 0; i < 20; i++) {
1847 if (fe->ops->i2c_gate_ctrl) 1847 if (fe->ops.i2c_gate_ctrl)
1848 fe->ops->i2c_gate_ctrl(fe, 1); 1848 fe->ops.i2c_gate_ctrl(fe, 1);
1849 if (i2c_transfer(&av7110->i2c_adap, &readmsg, 1) == 1) 1849 if (i2c_transfer(&av7110->i2c_adap, &readmsg, 1) == 1)
1850 if (data[0] & 0x40) break; 1850 if (data[0] & 0x40) break;
1851 msleep(10); 1851 msleep(10);
@@ -1891,8 +1891,8 @@ static int grundig_29504_401_tuner_set_params(struct dvb_frontend* fe, struct dv
1891 data[2] = ((div >> 10) & 0x60) | cfg; 1891 data[2] = ((div >> 10) & 0x60) | cfg;
1892 data[3] = (cpump << 6) | band_select; 1892 data[3] = (cpump << 6) | band_select;
1893 1893
1894 if (fe->ops->i2c_gate_ctrl) 1894 if (fe->ops.i2c_gate_ctrl)
1895 fe->ops->i2c_gate_ctrl(fe, 1); 1895 fe->ops.i2c_gate_ctrl(fe, 1);
1896 if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1) return -EIO; 1896 if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1) return -EIO;
1897 return 0; 1897 return 0;
1898} 1898}
@@ -2085,7 +2085,7 @@ static int frontend_init(struct av7110 *av7110)
2085 av7110->fe = ves1820_attach(&philips_cd1516_config, 2085 av7110->fe = ves1820_attach(&philips_cd1516_config,
2086 &av7110->i2c_adap, read_pwm(av7110)); 2086 &av7110->i2c_adap, read_pwm(av7110));
2087 if (av7110->fe) { 2087 if (av7110->fe) {
2088 av7110->fe->ops->tuner_ops.set_params = philips_cd1516_tuner_set_params; 2088 av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params;
2089 } 2089 }
2090 break; 2090 break;
2091 } 2091 }
@@ -2099,10 +2099,10 @@ static int frontend_init(struct av7110 *av7110)
2099 // try the ALPS BSRV2 first of all 2099 // try the ALPS BSRV2 first of all
2100 av7110->fe = ves1x93_attach(&alps_bsrv2_config, &av7110->i2c_adap); 2100 av7110->fe = ves1x93_attach(&alps_bsrv2_config, &av7110->i2c_adap);
2101 if (av7110->fe) { 2101 if (av7110->fe) {
2102 av7110->fe->ops->tuner_ops.set_params = alps_bsrv2_tuner_set_params; 2102 av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params;
2103 av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; 2103 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd;
2104 av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst; 2104 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst;
2105 av7110->fe->ops->set_tone = av7110_set_tone; 2105 av7110->fe->ops.set_tone = av7110_set_tone;
2106 av7110->recover = dvb_s_recover; 2106 av7110->recover = dvb_s_recover;
2107 break; 2107 break;
2108 } 2108 }
@@ -2110,12 +2110,12 @@ static int frontend_init(struct av7110 *av7110)
2110 // try the ALPS BSRU6 now 2110 // try the ALPS BSRU6 now
2111 av7110->fe = stv0299_attach(&alps_bsru6_config, &av7110->i2c_adap); 2111 av7110->fe = stv0299_attach(&alps_bsru6_config, &av7110->i2c_adap);
2112 if (av7110->fe) { 2112 if (av7110->fe) {
2113 av7110->fe->ops->tuner_ops.set_params = alps_bsru6_tuner_set_params; 2113 av7110->fe->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
2114 av7110->fe->tuner_priv = &av7110->i2c_adap; 2114 av7110->fe->tuner_priv = &av7110->i2c_adap;
2115 2115
2116 av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; 2116 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd;
2117 av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst; 2117 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst;
2118 av7110->fe->ops->set_tone = av7110_set_tone; 2118 av7110->fe->ops.set_tone = av7110_set_tone;
2119 av7110->recover = dvb_s_recover; 2119 av7110->recover = dvb_s_recover;
2120 break; 2120 break;
2121 } 2121 }
@@ -2123,10 +2123,10 @@ static int frontend_init(struct av7110 *av7110)
2123 // Try the grundig 29504-451 2123 // Try the grundig 29504-451
2124 av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap); 2124 av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap);
2125 if (av7110->fe) { 2125 if (av7110->fe) {
2126 av7110->fe->ops->tuner_ops.set_params = grundig_29504_451_tuner_set_params; 2126 av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params;
2127 av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; 2127 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd;
2128 av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst; 2128 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst;
2129 av7110->fe->ops->set_tone = av7110_set_tone; 2129 av7110->fe->ops.set_tone = av7110_set_tone;
2130 av7110->recover = dvb_s_recover; 2130 av7110->recover = dvb_s_recover;
2131 break; 2131 break;
2132 } 2132 }
@@ -2138,7 +2138,7 @@ static int frontend_init(struct av7110 *av7110)
2138 av7110->fe = ves1820_attach(&philips_cd1516_config, &av7110->i2c_adap, 2138 av7110->fe = ves1820_attach(&philips_cd1516_config, &av7110->i2c_adap,
2139 read_pwm(av7110)); 2139 read_pwm(av7110));
2140 if (av7110->fe) { 2140 if (av7110->fe) {
2141 av7110->fe->ops->tuner_ops.set_params = philips_cd1516_tuner_set_params; 2141 av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params;
2142 } 2142 }
2143 break; 2143 break;
2144 case 0x0003: 2144 case 0x0003:
@@ -2146,7 +2146,7 @@ static int frontend_init(struct av7110 *av7110)
2146 av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, 2146 av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap,
2147 read_pwm(av7110)); 2147 read_pwm(av7110));
2148 if (av7110->fe) { 2148 if (av7110->fe) {
2149 av7110->fe->ops->tuner_ops.set_params = alps_tdbe2_tuner_set_params; 2149 av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params;
2150 } 2150 }
2151 break; 2151 break;
2152 } 2152 }
@@ -2157,7 +2157,7 @@ static int frontend_init(struct av7110 *av7110)
2157 // ALPS TDLB7 2157 // ALPS TDLB7
2158 av7110->fe = sp8870_attach(&alps_tdlb7_config, &av7110->i2c_adap); 2158 av7110->fe = sp8870_attach(&alps_tdlb7_config, &av7110->i2c_adap);
2159 if (av7110->fe) { 2159 if (av7110->fe) {
2160 av7110->fe->ops->tuner_ops.set_params = alps_tdlb7_tuner_set_params; 2160 av7110->fe->ops.tuner_ops.set_params = alps_tdlb7_tuner_set_params;
2161 } 2161 }
2162 break; 2162 break;
2163 2163
@@ -2165,7 +2165,7 @@ static int frontend_init(struct av7110 *av7110)
2165 2165
2166 av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110)); 2166 av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110));
2167 if (av7110->fe) { 2167 if (av7110->fe) {
2168 av7110->fe->ops->tuner_ops.set_params = alps_tdbe2_tuner_set_params; 2168 av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params;
2169 } 2169 }
2170 break; 2170 break;
2171 2171
@@ -2173,10 +2173,10 @@ static int frontend_init(struct av7110 *av7110)
2173 /* ALPS BSRV2 */ 2173 /* ALPS BSRV2 */
2174 av7110->fe = ves1x93_attach(&alps_bsrv2_config, &av7110->i2c_adap); 2174 av7110->fe = ves1x93_attach(&alps_bsrv2_config, &av7110->i2c_adap);
2175 if (av7110->fe) { 2175 if (av7110->fe) {
2176 av7110->fe->ops->tuner_ops.set_params = alps_bsrv2_tuner_set_params; 2176 av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params;
2177 av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; 2177 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd;
2178 av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst; 2178 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst;
2179 av7110->fe->ops->set_tone = av7110_set_tone; 2179 av7110->fe->ops.set_tone = av7110_set_tone;
2180 av7110->recover = dvb_s_recover; 2180 av7110->recover = dvb_s_recover;
2181 } 2181 }
2182 break; 2182 break;
@@ -2185,10 +2185,10 @@ static int frontend_init(struct av7110 *av7110)
2185 /* Grundig 29504-451 */ 2185 /* Grundig 29504-451 */
2186 av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap); 2186 av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap);
2187 if (av7110->fe) { 2187 if (av7110->fe) {
2188 av7110->fe->ops->tuner_ops.set_params = grundig_29504_451_tuner_set_params; 2188 av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params;
2189 av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; 2189 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd;
2190 av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst; 2190 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst;
2191 av7110->fe->ops->set_tone = av7110_set_tone; 2191 av7110->fe->ops.set_tone = av7110_set_tone;
2192 av7110->recover = dvb_s_recover; 2192 av7110->recover = dvb_s_recover;
2193 } 2193 }
2194 break; 2194 break;
@@ -2197,7 +2197,7 @@ static int frontend_init(struct av7110 *av7110)
2197 2197
2198 av7110->fe = l64781_attach(&grundig_29504_401_config, &av7110->i2c_adap); 2198 av7110->fe = l64781_attach(&grundig_29504_401_config, &av7110->i2c_adap);
2199 if (av7110->fe) { 2199 if (av7110->fe) {
2200 av7110->fe->ops->tuner_ops.set_params = grundig_29504_401_tuner_set_params; 2200 av7110->fe->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params;
2201 } 2201 }
2202 break; 2202 break;
2203 2203
@@ -2205,7 +2205,7 @@ static int frontend_init(struct av7110 *av7110)
2205 2205
2206 av7110->fe = stv0297_attach(&nexusca_stv0297_config, &av7110->i2c_adap); 2206 av7110->fe = stv0297_attach(&nexusca_stv0297_config, &av7110->i2c_adap);
2207 if (av7110->fe) { 2207 if (av7110->fe) {
2208 av7110->fe->ops->tuner_ops.set_params = nexusca_stv0297_tuner_set_params; 2208 av7110->fe->ops.tuner_ops.set_params = nexusca_stv0297_tuner_set_params;
2209 2209
2210 /* set TDA9819 into DVB mode */ 2210 /* set TDA9819 into DVB mode */
2211 saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9198 pin9(STD) 2211 saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9198 pin9(STD)
@@ -2221,16 +2221,16 @@ static int frontend_init(struct av7110 *av7110)
2221 /* ALPS BSBE1 */ 2221 /* ALPS BSBE1 */
2222 av7110->fe = stv0299_attach(&alps_bsbe1_config, &av7110->i2c_adap); 2222 av7110->fe = stv0299_attach(&alps_bsbe1_config, &av7110->i2c_adap);
2223 if (av7110->fe) { 2223 if (av7110->fe) {
2224 av7110->fe->ops->tuner_ops.set_params = alps_bsbe1_tuner_set_params; 2224 av7110->fe->ops.tuner_ops.set_params = alps_bsbe1_tuner_set_params;
2225 av7110->fe->tuner_priv = &av7110->i2c_adap; 2225 av7110->fe->tuner_priv = &av7110->i2c_adap;
2226 2226
2227 if (lnbp21_attach(av7110->fe, &av7110->i2c_adap, 0, 0)) { 2227 if (lnbp21_attach(av7110->fe, &av7110->i2c_adap, 0, 0)) {
2228 printk("dvb-ttpci: LNBP21 not found!\n"); 2228 printk("dvb-ttpci: LNBP21 not found!\n");
2229 if (av7110->fe->ops->release) 2229 if (av7110->fe->ops.release)
2230 av7110->fe->ops->release(av7110->fe); 2230 av7110->fe->ops.release(av7110->fe);
2231 av7110->fe = NULL; 2231 av7110->fe = NULL;
2232 } else { 2232 } else {
2233 av7110->fe->ops->dishnetwork_send_legacy_command = NULL; 2233 av7110->fe->ops.dishnetwork_send_legacy_command = NULL;
2234 av7110->recover = dvb_s_recover; 2234 av7110->recover = dvb_s_recover;
2235 } 2235 }
2236 } 2236 }
@@ -2247,21 +2247,21 @@ static int frontend_init(struct av7110 *av7110)
2247 av7110->dev->pci->subsystem_vendor, 2247 av7110->dev->pci->subsystem_vendor,
2248 av7110->dev->pci->subsystem_device); 2248 av7110->dev->pci->subsystem_device);
2249 } else { 2249 } else {
2250 FE_FUNC_OVERRIDE(av7110->fe->ops->init, av7110->fe_init, av7110_fe_init); 2250 FE_FUNC_OVERRIDE(av7110->fe->ops.init, av7110->fe_init, av7110_fe_init);
2251 FE_FUNC_OVERRIDE(av7110->fe->ops->read_status, av7110->fe_read_status, av7110_fe_read_status); 2251 FE_FUNC_OVERRIDE(av7110->fe->ops.read_status, av7110->fe_read_status, av7110_fe_read_status);
2252 FE_FUNC_OVERRIDE(av7110->fe->ops->diseqc_reset_overload, av7110->fe_diseqc_reset_overload, av7110_fe_diseqc_reset_overload); 2252 FE_FUNC_OVERRIDE(av7110->fe->ops.diseqc_reset_overload, av7110->fe_diseqc_reset_overload, av7110_fe_diseqc_reset_overload);
2253 FE_FUNC_OVERRIDE(av7110->fe->ops->diseqc_send_master_cmd, av7110->fe_diseqc_send_master_cmd, av7110_fe_diseqc_send_master_cmd); 2253 FE_FUNC_OVERRIDE(av7110->fe->ops.diseqc_send_master_cmd, av7110->fe_diseqc_send_master_cmd, av7110_fe_diseqc_send_master_cmd);
2254 FE_FUNC_OVERRIDE(av7110->fe->ops->diseqc_send_burst, av7110->fe_diseqc_send_burst, av7110_fe_diseqc_send_burst); 2254 FE_FUNC_OVERRIDE(av7110->fe->ops.diseqc_send_burst, av7110->fe_diseqc_send_burst, av7110_fe_diseqc_send_burst);
2255 FE_FUNC_OVERRIDE(av7110->fe->ops->set_tone, av7110->fe_set_tone, av7110_fe_set_tone); 2255 FE_FUNC_OVERRIDE(av7110->fe->ops.set_tone, av7110->fe_set_tone, av7110_fe_set_tone);
2256 FE_FUNC_OVERRIDE(av7110->fe->ops->set_voltage, av7110->fe_set_voltage, av7110_fe_set_voltage;) 2256 FE_FUNC_OVERRIDE(av7110->fe->ops.set_voltage, av7110->fe_set_voltage, av7110_fe_set_voltage;)
2257 FE_FUNC_OVERRIDE(av7110->fe->ops->dishnetwork_send_legacy_command, av7110->fe_dishnetwork_send_legacy_command, av7110_fe_dishnetwork_send_legacy_command); 2257 FE_FUNC_OVERRIDE(av7110->fe->ops.dishnetwork_send_legacy_command, av7110->fe_dishnetwork_send_legacy_command, av7110_fe_dishnetwork_send_legacy_command);
2258 FE_FUNC_OVERRIDE(av7110->fe->ops->set_frontend, av7110->fe_set_frontend, av7110_fe_set_frontend); 2258 FE_FUNC_OVERRIDE(av7110->fe->ops.set_frontend, av7110->fe_set_frontend, av7110_fe_set_frontend);
2259 2259
2260 ret = dvb_register_frontend(&av7110->dvb_adapter, av7110->fe); 2260 ret = dvb_register_frontend(&av7110->dvb_adapter, av7110->fe);
2261 if (ret < 0) { 2261 if (ret < 0) {
2262 printk("av7110: Frontend registration failed!\n"); 2262 printk("av7110: Frontend registration failed!\n");
2263 if (av7110->fe->ops->release) 2263 if (av7110->fe->ops.release)
2264 av7110->fe->ops->release(av7110->fe); 2264 av7110->fe->ops.release(av7110->fe);
2265 av7110->fe = NULL; 2265 av7110->fe = NULL;
2266 } 2266 }
2267 } 2267 }
diff --git a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c
index 3ff67523cce2..99ab60778853 100644
--- a/drivers/media/dvb/ttpci/budget-av.c
+++ b/drivers/media/dvb/ttpci/budget-av.c
@@ -541,8 +541,8 @@ static int philips_su1278_ty_ci_tuner_set_params(struct dvb_frontend *fe,
541 else if (params->frequency < 2150000) 541 else if (params->frequency < 2150000)
542 buf[3] |= 0xC0; 542 buf[3] |= 0xC0;
543 543
544 if (fe->ops->i2c_gate_ctrl) 544 if (fe->ops.i2c_gate_ctrl)
545 fe->ops->i2c_gate_ctrl(fe, 1); 545 fe->ops.i2c_gate_ctrl(fe, 1);
546 if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) 546 if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1)
547 return -EIO; 547 return -EIO;
548 return 0; 548 return 0;
@@ -662,22 +662,22 @@ static int philips_su1278sh2_tua6100_tuner_set_params(struct dvb_frontend *fe,
662 reg0[1] |= 0x03; 662 reg0[1] |= 0x03;
663 663
664 /* already enabled - do not reenable i2c repeater or TX fails */ 664 /* already enabled - do not reenable i2c repeater or TX fails */
665 if (fe->ops->i2c_gate_ctrl) 665 if (fe->ops.i2c_gate_ctrl)
666 fe->ops->i2c_gate_ctrl(fe, 1); 666 fe->ops.i2c_gate_ctrl(fe, 1);
667 msg.buf = reg0; 667 msg.buf = reg0;
668 msg.len = sizeof(reg0); 668 msg.len = sizeof(reg0);
669 if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) 669 if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1)
670 return -EIO; 670 return -EIO;
671 671
672 if (fe->ops->i2c_gate_ctrl) 672 if (fe->ops.i2c_gate_ctrl)
673 fe->ops->i2c_gate_ctrl(fe, 1); 673 fe->ops.i2c_gate_ctrl(fe, 1);
674 msg.buf = reg1; 674 msg.buf = reg1;
675 msg.len = sizeof(reg1); 675 msg.len = sizeof(reg1);
676 if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) 676 if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1)
677 return -EIO; 677 return -EIO;
678 678
679 if (fe->ops->i2c_gate_ctrl) 679 if (fe->ops.i2c_gate_ctrl)
680 fe->ops->i2c_gate_ctrl(fe, 1); 680 fe->ops.i2c_gate_ctrl(fe, 1);
681 msg.buf = reg2; 681 msg.buf = reg2;
682 msg.len = sizeof(reg2); 682 msg.len = sizeof(reg2);
683 if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) 683 if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1)
@@ -781,8 +781,8 @@ static int philips_cu1216_tuner_set_params(struct dvb_frontend *fe, struct dvb_f
781 buf[3] = (params->frequency < 150000000 ? 0x01 : 781 buf[3] = (params->frequency < 150000000 ? 0x01 :
782 params->frequency < 445000000 ? 0x02 : 0x04); 782 params->frequency < 445000000 ? 0x02 : 0x04);
783 783
784 if (fe->ops->i2c_gate_ctrl) 784 if (fe->ops.i2c_gate_ctrl)
785 fe->ops->i2c_gate_ctrl(fe, 1); 785 fe->ops.i2c_gate_ctrl(fe, 1);
786 if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) 786 if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1)
787 return -EIO; 787 return -EIO;
788 return 0; 788 return 0;
@@ -802,8 +802,8 @@ static int philips_tu1216_tuner_init(struct dvb_frontend *fe)
802 struct i2c_msg tuner_msg = {.addr = 0x60,.flags = 0,.buf = tu1216_init,.len = sizeof(tu1216_init) }; 802 struct i2c_msg tuner_msg = {.addr = 0x60,.flags = 0,.buf = tu1216_init,.len = sizeof(tu1216_init) };
803 803
804 // setup PLL configuration 804 // setup PLL configuration
805 if (fe->ops->i2c_gate_ctrl) 805 if (fe->ops.i2c_gate_ctrl)
806 fe->ops->i2c_gate_ctrl(fe, 1); 806 fe->ops.i2c_gate_ctrl(fe, 1);
807 if (i2c_transfer(&budget->i2c_adap, &tuner_msg, 1) != 1) 807 if (i2c_transfer(&budget->i2c_adap, &tuner_msg, 1) != 1)
808 return -EIO; 808 return -EIO;
809 msleep(1); 809 msleep(1);
@@ -885,8 +885,8 @@ static int philips_tu1216_tuner_set_params(struct dvb_frontend *fe, struct dvb_f
885 tuner_buf[2] = 0xca; 885 tuner_buf[2] = 0xca;
886 tuner_buf[3] = (cp << 5) | (filter << 3) | band; 886 tuner_buf[3] = (cp << 5) | (filter << 3) | band;
887 887
888 if (fe->ops->i2c_gate_ctrl) 888 if (fe->ops.i2c_gate_ctrl)
889 fe->ops->i2c_gate_ctrl(fe, 1); 889 fe->ops.i2c_gate_ctrl(fe, 1);
890 if (i2c_transfer(&budget->i2c_adap, &tuner_msg, 1) != 1) 890 if (i2c_transfer(&budget->i2c_adap, &tuner_msg, 1) != 1)
891 return -EIO; 891 return -EIO;
892 892
@@ -971,8 +971,8 @@ static int philips_sd1878_tda8261_tuner_set_params(struct dvb_frontend *fe,
971 params->frequency, 0); 971 params->frequency, 0);
972 if(rc < 0) return rc; 972 if(rc < 0) return rc;
973 973
974 if (fe->ops->i2c_gate_ctrl) 974 if (fe->ops.i2c_gate_ctrl)
975 fe->ops->i2c_gate_ctrl(fe, 1); 975 fe->ops.i2c_gate_ctrl(fe, 1);
976 if(i2c_transfer(&budget->i2c_adap, &tuner_msg, 1) != 1) 976 if(i2c_transfer(&budget->i2c_adap, &tuner_msg, 1) != 1)
977 return -EIO; 977 return -EIO;
978 978
@@ -1099,13 +1099,13 @@ static void frontend_init(struct budget_av *budget_av)
1099 fe = stv0299_attach(&cinergy_1200s_1894_0010_config, 1099 fe = stv0299_attach(&cinergy_1200s_1894_0010_config,
1100 &budget_av->budget.i2c_adap); 1100 &budget_av->budget.i2c_adap);
1101 if (fe) { 1101 if (fe) {
1102 fe->ops->tuner_ops.set_params = philips_su1278sh2_tua6100_tuner_set_params; 1102 fe->ops.tuner_ops.set_params = philips_su1278sh2_tua6100_tuner_set_params;
1103 } 1103 }
1104 } else { 1104 } else {
1105 fe = stv0299_attach(&typhoon_config, 1105 fe = stv0299_attach(&typhoon_config,
1106 &budget_av->budget.i2c_adap); 1106 &budget_av->budget.i2c_adap);
1107 if (fe) { 1107 if (fe) {
1108 fe->ops->tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params; 1108 fe->ops.tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params;
1109 } 1109 }
1110 } 1110 }
1111 break; 1111 break;
@@ -1117,7 +1117,7 @@ static void frontend_init(struct budget_av *budget_av)
1117 fe = stv0299_attach(&philips_sd1878_config, 1117 fe = stv0299_attach(&philips_sd1878_config,
1118 &budget_av->budget.i2c_adap); 1118 &budget_av->budget.i2c_adap);
1119 if (fe) { 1119 if (fe) {
1120 fe->ops->tuner_ops.set_params = philips_sd1878_tda8261_tuner_set_params; 1120 fe->ops.tuner_ops.set_params = philips_sd1878_tda8261_tuner_set_params;
1121 } 1121 }
1122 break; 1122 break;
1123 1123
@@ -1126,7 +1126,7 @@ static void frontend_init(struct budget_av *budget_av)
1126 fe = stv0299_attach(&typhoon_config, 1126 fe = stv0299_attach(&typhoon_config,
1127 &budget_av->budget.i2c_adap); 1127 &budget_av->budget.i2c_adap);
1128 if (fe) { 1128 if (fe) {
1129 fe->ops->tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params; 1129 fe->ops.tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params;
1130 } 1130 }
1131 break; 1131 break;
1132 1132
@@ -1134,7 +1134,7 @@ static void frontend_init(struct budget_av *budget_av)
1134 fe = stv0299_attach(&cinergy_1200s_config, 1134 fe = stv0299_attach(&cinergy_1200s_config,
1135 &budget_av->budget.i2c_adap); 1135 &budget_av->budget.i2c_adap);
1136 if (fe) { 1136 if (fe) {
1137 fe->ops->tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params; 1137 fe->ops.tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params;
1138 } 1138 }
1139 break; 1139 break;
1140 1140
@@ -1147,9 +1147,9 @@ static void frontend_init(struct budget_av *budget_av)
1147 read_pwm(budget_av)); 1147 read_pwm(budget_av));
1148 if (fe) { 1148 if (fe) {
1149 budget_av->tda10021_poclkp = 1; 1149 budget_av->tda10021_poclkp = 1;
1150 budget_av->tda10021_set_frontend = fe->ops->set_frontend; 1150 budget_av->tda10021_set_frontend = fe->ops.set_frontend;
1151 fe->ops->set_frontend = tda10021_set_frontend; 1151 fe->ops.set_frontend = tda10021_set_frontend;
1152 fe->ops->tuner_ops.set_params = philips_cu1216_tuner_set_params; 1152 fe->ops.tuner_ops.set_params = philips_cu1216_tuner_set_params;
1153 } 1153 }
1154 break; 1154 break;
1155 1155
@@ -1160,8 +1160,8 @@ static void frontend_init(struct budget_av *budget_av)
1160 fe = tda10046_attach(&philips_tu1216_config, 1160 fe = tda10046_attach(&philips_tu1216_config,
1161 &budget_av->budget.i2c_adap); 1161 &budget_av->budget.i2c_adap);
1162 if (fe) { 1162 if (fe) {
1163 fe->ops->tuner_ops.init = philips_tu1216_tuner_init; 1163 fe->ops.tuner_ops.init = philips_tu1216_tuner_init;
1164 fe->ops->tuner_ops.set_params = philips_tu1216_tuner_set_params; 1164 fe->ops.tuner_ops.set_params = philips_tu1216_tuner_set_params;
1165 } 1165 }
1166 break; 1166 break;
1167 } 1167 }
@@ -1181,8 +1181,8 @@ static void frontend_init(struct budget_av *budget_av)
1181 if (dvb_register_frontend(&budget_av->budget.dvb_adapter, 1181 if (dvb_register_frontend(&budget_av->budget.dvb_adapter,
1182 budget_av->budget.dvb_frontend)) { 1182 budget_av->budget.dvb_frontend)) {
1183 printk(KERN_ERR "budget-av: Frontend registration failed!\n"); 1183 printk(KERN_ERR "budget-av: Frontend registration failed!\n");
1184 if (budget_av->budget.dvb_frontend->ops->release) 1184 if (budget_av->budget.dvb_frontend->ops.release)
1185 budget_av->budget.dvb_frontend->ops->release(budget_av->budget.dvb_frontend); 1185 budget_av->budget.dvb_frontend->ops.release(budget_av->budget.dvb_frontend);
1186 budget_av->budget.dvb_frontend = NULL; 1186 budget_av->budget.dvb_frontend = NULL;
1187 } 1187 }
1188} 1188}
diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c
index eb03b140b05c..4b966eea3834 100644
--- a/drivers/media/dvb/ttpci/budget-ci.c
+++ b/drivers/media/dvb/ttpci/budget-ci.c
@@ -649,8 +649,8 @@ static int philips_su1278_tt_tuner_set_params(struct dvb_frontend *fe,
649 else if (params->frequency < 2150000) 649 else if (params->frequency < 2150000)
650 buf[3] |= 0xC0; 650 buf[3] |= 0xC0;
651 651
652 if (fe->ops->i2c_gate_ctrl) 652 if (fe->ops.i2c_gate_ctrl)
653 fe->ops->i2c_gate_ctrl(fe, 1); 653 fe->ops.i2c_gate_ctrl(fe, 1);
654 if (i2c_transfer(&budget_ci->budget.i2c_adap, &msg, 1) != 1) 654 if (i2c_transfer(&budget_ci->budget.i2c_adap, &msg, 1) != 1)
655 return -EIO; 655 return -EIO;
656 return 0; 656 return 0;
@@ -680,8 +680,8 @@ static int philips_tdm1316l_tuner_init(struct dvb_frontend *fe)
680 sizeof(td1316_init) }; 680 sizeof(td1316_init) };
681 681
682 // setup PLL configuration 682 // setup PLL configuration
683 if (fe->ops->i2c_gate_ctrl) 683 if (fe->ops.i2c_gate_ctrl)
684 fe->ops->i2c_gate_ctrl(fe, 1); 684 fe->ops.i2c_gate_ctrl(fe, 1);
685 if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1) 685 if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1)
686 return -EIO; 686 return -EIO;
687 msleep(1); 687 msleep(1);
@@ -690,11 +690,11 @@ static int philips_tdm1316l_tuner_init(struct dvb_frontend *fe)
690 tuner_msg.addr = 0x65; 690 tuner_msg.addr = 0x65;
691 tuner_msg.buf = disable_mc44BC374c; 691 tuner_msg.buf = disable_mc44BC374c;
692 tuner_msg.len = sizeof(disable_mc44BC374c); 692 tuner_msg.len = sizeof(disable_mc44BC374c);
693 if (fe->ops->i2c_gate_ctrl) 693 if (fe->ops.i2c_gate_ctrl)
694 fe->ops->i2c_gate_ctrl(fe, 1); 694 fe->ops.i2c_gate_ctrl(fe, 1);
695 if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1) { 695 if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1) {
696 if (fe->ops->i2c_gate_ctrl) 696 if (fe->ops.i2c_gate_ctrl)
697 fe->ops->i2c_gate_ctrl(fe, 1); 697 fe->ops.i2c_gate_ctrl(fe, 1);
698 i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1); 698 i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1);
699 } 699 }
700 700
@@ -777,8 +777,8 @@ static int philips_tdm1316l_tuner_set_params(struct dvb_frontend *fe, struct dvb
777 tuner_buf[2] = 0xca; 777 tuner_buf[2] = 0xca;
778 tuner_buf[3] = (cp << 5) | (filter << 3) | band; 778 tuner_buf[3] = (cp << 5) | (filter << 3) | band;
779 779
780 if (fe->ops->i2c_gate_ctrl) 780 if (fe->ops.i2c_gate_ctrl)
781 fe->ops->i2c_gate_ctrl(fe, 1); 781 fe->ops.i2c_gate_ctrl(fe, 1);
782 if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1) 782 if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1)
783 return -EIO; 783 return -EIO;
784 784
@@ -863,15 +863,15 @@ static int dvbc_philips_tdm1316l_tuner_set_params(struct dvb_frontend *fe, struc
863 tuner_buf[3] = (cp << 5) | (filter << 3) | band; 863 tuner_buf[3] = (cp << 5) | (filter << 3) | band;
864 tuner_buf[4] = 0x80; 864 tuner_buf[4] = 0x80;
865 865
866 if (fe->ops->i2c_gate_ctrl) 866 if (fe->ops.i2c_gate_ctrl)
867 fe->ops->i2c_gate_ctrl(fe, 1); 867 fe->ops.i2c_gate_ctrl(fe, 1);
868 if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1) 868 if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1)
869 return -EIO; 869 return -EIO;
870 870
871 msleep(50); 871 msleep(50);
872 872
873 if (fe->ops->i2c_gate_ctrl) 873 if (fe->ops.i2c_gate_ctrl)
874 fe->ops->i2c_gate_ctrl(fe, 1); 874 fe->ops.i2c_gate_ctrl(fe, 1);
875 if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1) 875 if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1)
876 return -EIO; 876 return -EIO;
877 877
@@ -990,7 +990,7 @@ static void frontend_init(struct budget_ci *budget_ci)
990 budget_ci->budget.dvb_frontend = 990 budget_ci->budget.dvb_frontend =
991 stv0299_attach(&alps_bsru6_config, &budget_ci->budget.i2c_adap); 991 stv0299_attach(&alps_bsru6_config, &budget_ci->budget.i2c_adap);
992 if (budget_ci->budget.dvb_frontend) { 992 if (budget_ci->budget.dvb_frontend) {
993 budget_ci->budget.dvb_frontend->ops->tuner_ops.set_params = alps_bsru6_tuner_set_params; 993 budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
994 budget_ci->budget.dvb_frontend->tuner_priv = &budget_ci->budget.i2c_adap; 994 budget_ci->budget.dvb_frontend->tuner_priv = &budget_ci->budget.i2c_adap;
995 break; 995 break;
996 } 996 }
@@ -1000,7 +1000,7 @@ static void frontend_init(struct budget_ci *budget_ci)
1000 budget_ci->budget.dvb_frontend = 1000 budget_ci->budget.dvb_frontend =
1001 stv0299_attach(&philips_su1278_tt_config, &budget_ci->budget.i2c_adap); 1001 stv0299_attach(&philips_su1278_tt_config, &budget_ci->budget.i2c_adap);
1002 if (budget_ci->budget.dvb_frontend) { 1002 if (budget_ci->budget.dvb_frontend) {
1003 budget_ci->budget.dvb_frontend->ops->tuner_ops.set_params = philips_su1278_tt_tuner_set_params; 1003 budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = philips_su1278_tt_tuner_set_params;
1004 break; 1004 break;
1005 } 1005 }
1006 break; 1006 break;
@@ -1010,7 +1010,7 @@ static void frontend_init(struct budget_ci *budget_ci)
1010 budget_ci->budget.dvb_frontend = 1010 budget_ci->budget.dvb_frontend =
1011 stv0297_attach(&dvbc_philips_tdm1316l_config, &budget_ci->budget.i2c_adap); 1011 stv0297_attach(&dvbc_philips_tdm1316l_config, &budget_ci->budget.i2c_adap);
1012 if (budget_ci->budget.dvb_frontend) { 1012 if (budget_ci->budget.dvb_frontend) {
1013 budget_ci->budget.dvb_frontend->ops->tuner_ops.set_params = dvbc_philips_tdm1316l_tuner_set_params; 1013 budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = dvbc_philips_tdm1316l_tuner_set_params;
1014 break; 1014 break;
1015 } 1015 }
1016 break; 1016 break;
@@ -1020,8 +1020,8 @@ static void frontend_init(struct budget_ci *budget_ci)
1020 budget_ci->budget.dvb_frontend = 1020 budget_ci->budget.dvb_frontend =
1021 tda10045_attach(&philips_tdm1316l_config, &budget_ci->budget.i2c_adap); 1021 tda10045_attach(&philips_tdm1316l_config, &budget_ci->budget.i2c_adap);
1022 if (budget_ci->budget.dvb_frontend) { 1022 if (budget_ci->budget.dvb_frontend) {
1023 budget_ci->budget.dvb_frontend->ops->tuner_ops.init = philips_tdm1316l_tuner_init; 1023 budget_ci->budget.dvb_frontend->ops.tuner_ops.init = philips_tdm1316l_tuner_init;
1024 budget_ci->budget.dvb_frontend->ops->tuner_ops.set_params = philips_tdm1316l_tuner_set_params; 1024 budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = philips_tdm1316l_tuner_set_params;
1025 break; 1025 break;
1026 } 1026 }
1027 break; 1027 break;
@@ -1031,8 +1031,8 @@ static void frontend_init(struct budget_ci *budget_ci)
1031 budget_ci->budget.dvb_frontend = 1031 budget_ci->budget.dvb_frontend =
1032 tda10046_attach(&philips_tdm1316l_config, &budget_ci->budget.i2c_adap); 1032 tda10046_attach(&philips_tdm1316l_config, &budget_ci->budget.i2c_adap);
1033 if (budget_ci->budget.dvb_frontend) { 1033 if (budget_ci->budget.dvb_frontend) {
1034 budget_ci->budget.dvb_frontend->ops->tuner_ops.init = philips_tdm1316l_tuner_init; 1034 budget_ci->budget.dvb_frontend->ops.tuner_ops.init = philips_tdm1316l_tuner_init;
1035 budget_ci->budget.dvb_frontend->ops->tuner_ops.set_params = philips_tdm1316l_tuner_set_params; 1035 budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = philips_tdm1316l_tuner_set_params;
1036 break; 1036 break;
1037 } 1037 }
1038 break; 1038 break;
@@ -1040,14 +1040,14 @@ static void frontend_init(struct budget_ci *budget_ci)
1040 case 0x1017: // TT S-1500 PCI 1040 case 0x1017: // TT S-1500 PCI
1041 budget_ci->budget.dvb_frontend = stv0299_attach(&alps_bsbe1_config, &budget_ci->budget.i2c_adap); 1041 budget_ci->budget.dvb_frontend = stv0299_attach(&alps_bsbe1_config, &budget_ci->budget.i2c_adap);
1042 if (budget_ci->budget.dvb_frontend) { 1042 if (budget_ci->budget.dvb_frontend) {
1043 budget_ci->budget.dvb_frontend->ops->tuner_ops.set_params = alps_bsbe1_tuner_set_params; 1043 budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = alps_bsbe1_tuner_set_params;
1044 budget_ci->budget.dvb_frontend->tuner_priv = &budget_ci->budget.i2c_adap; 1044 budget_ci->budget.dvb_frontend->tuner_priv = &budget_ci->budget.i2c_adap;
1045 1045
1046 budget_ci->budget.dvb_frontend->ops->dishnetwork_send_legacy_command = NULL; 1046 budget_ci->budget.dvb_frontend->ops.dishnetwork_send_legacy_command = NULL;
1047 if (lnbp21_attach(budget_ci->budget.dvb_frontend, &budget_ci->budget.i2c_adap, LNBP21_LLC, 0)) { 1047 if (lnbp21_attach(budget_ci->budget.dvb_frontend, &budget_ci->budget.i2c_adap, LNBP21_LLC, 0)) {
1048 printk("%s: No LNBP21 found!\n", __FUNCTION__); 1048 printk("%s: No LNBP21 found!\n", __FUNCTION__);
1049 if (budget_ci->budget.dvb_frontend->ops->release) 1049 if (budget_ci->budget.dvb_frontend->ops.release)
1050 budget_ci->budget.dvb_frontend->ops->release(budget_ci->budget.dvb_frontend); 1050 budget_ci->budget.dvb_frontend->ops.release(budget_ci->budget.dvb_frontend);
1051 budget_ci->budget.dvb_frontend = NULL; 1051 budget_ci->budget.dvb_frontend = NULL;
1052 } 1052 }
1053 } 1053 }
@@ -1065,8 +1065,8 @@ static void frontend_init(struct budget_ci *budget_ci)
1065 if (dvb_register_frontend 1065 if (dvb_register_frontend
1066 (&budget_ci->budget.dvb_adapter, budget_ci->budget.dvb_frontend)) { 1066 (&budget_ci->budget.dvb_adapter, budget_ci->budget.dvb_frontend)) {
1067 printk("budget-ci: Frontend registration failed!\n"); 1067 printk("budget-ci: Frontend registration failed!\n");
1068 if (budget_ci->budget.dvb_frontend->ops->release) 1068 if (budget_ci->budget.dvb_frontend->ops.release)
1069 budget_ci->budget.dvb_frontend->ops->release(budget_ci->budget.dvb_frontend); 1069 budget_ci->budget.dvb_frontend->ops.release(budget_ci->budget.dvb_frontend);
1070 budget_ci->budget.dvb_frontend = NULL; 1070 budget_ci->budget.dvb_frontend = NULL;
1071 } 1071 }
1072 } 1072 }
diff --git a/drivers/media/dvb/ttpci/budget-patch.c b/drivers/media/dvb/ttpci/budget-patch.c
index 3515f524176a..ee60ce90a400 100644
--- a/drivers/media/dvb/ttpci/budget-patch.c
+++ b/drivers/media/dvb/ttpci/budget-patch.c
@@ -281,8 +281,8 @@ static int alps_bsrv2_tuner_set_params(struct dvb_frontend* fe, struct dvb_front
281 // NOTE: since we're using a prescaler of 2, we set the 281 // NOTE: since we're using a prescaler of 2, we set the
282 // divisor frequency to 62.5kHz and divide by 125 above 282 // divisor frequency to 62.5kHz and divide by 125 above
283 283
284 if (fe->ops->i2c_gate_ctrl) 284 if (fe->ops.i2c_gate_ctrl)
285 fe->ops->i2c_gate_ctrl(fe, 1); 285 fe->ops.i2c_gate_ctrl(fe, 1);
286 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) 286 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1)
287 return -EIO; 287 return -EIO;
288 return 0; 288 return 0;
@@ -307,8 +307,8 @@ static int grundig_29504_451_tuner_set_params(struct dvb_frontend* fe, struct dv
307 data[2] = 0x8e; 307 data[2] = 0x8e;
308 data[3] = 0x00; 308 data[3] = 0x00;
309 309
310 if (fe->ops->i2c_gate_ctrl) 310 if (fe->ops.i2c_gate_ctrl)
311 fe->ops->i2c_gate_ctrl(fe, 1); 311 fe->ops.i2c_gate_ctrl(fe, 1);
312 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) 312 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1)
313 return -EIO; 313 return -EIO;
314 return 0; 314 return 0;
@@ -327,32 +327,32 @@ static void frontend_init(struct budget_patch* budget)
327 // try the ALPS BSRV2 first of all 327 // try the ALPS BSRV2 first of all
328 budget->dvb_frontend = ves1x93_attach(&alps_bsrv2_config, &budget->i2c_adap); 328 budget->dvb_frontend = ves1x93_attach(&alps_bsrv2_config, &budget->i2c_adap);
329 if (budget->dvb_frontend) { 329 if (budget->dvb_frontend) {
330 budget->dvb_frontend->ops->tuner_ops.set_params = alps_bsrv2_tuner_set_params; 330 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params;
331 budget->dvb_frontend->ops->diseqc_send_master_cmd = budget_patch_diseqc_send_master_cmd; 331 budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_patch_diseqc_send_master_cmd;
332 budget->dvb_frontend->ops->diseqc_send_burst = budget_patch_diseqc_send_burst; 332 budget->dvb_frontend->ops.diseqc_send_burst = budget_patch_diseqc_send_burst;
333 budget->dvb_frontend->ops->set_tone = budget_patch_set_tone; 333 budget->dvb_frontend->ops.set_tone = budget_patch_set_tone;
334 break; 334 break;
335 } 335 }
336 336
337 // try the ALPS BSRU6 now 337 // try the ALPS BSRU6 now
338 budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap); 338 budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap);
339 if (budget->dvb_frontend) { 339 if (budget->dvb_frontend) {
340 budget->dvb_frontend->ops->tuner_ops.set_params = alps_bsru6_tuner_set_params; 340 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
341 budget->dvb_frontend->tuner_priv = &budget->i2c_adap; 341 budget->dvb_frontend->tuner_priv = &budget->i2c_adap;
342 342
343 budget->dvb_frontend->ops->diseqc_send_master_cmd = budget_diseqc_send_master_cmd; 343 budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd;
344 budget->dvb_frontend->ops->diseqc_send_burst = budget_diseqc_send_burst; 344 budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst;
345 budget->dvb_frontend->ops->set_tone = budget_set_tone; 345 budget->dvb_frontend->ops.set_tone = budget_set_tone;
346 break; 346 break;
347 } 347 }
348 348
349 // Try the grundig 29504-451 349 // Try the grundig 29504-451
350 budget->dvb_frontend = tda8083_attach(&grundig_29504_451_config, &budget->i2c_adap); 350 budget->dvb_frontend = tda8083_attach(&grundig_29504_451_config, &budget->i2c_adap);
351 if (budget->dvb_frontend) { 351 if (budget->dvb_frontend) {
352 budget->dvb_frontend->ops->tuner_ops.set_params = grundig_29504_451_tuner_set_params; 352 budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params;
353 budget->dvb_frontend->ops->diseqc_send_master_cmd = budget_diseqc_send_master_cmd; 353 budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd;
354 budget->dvb_frontend->ops->diseqc_send_burst = budget_diseqc_send_burst; 354 budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst;
355 budget->dvb_frontend->ops->set_tone = budget_set_tone; 355 budget->dvb_frontend->ops.set_tone = budget_set_tone;
356 break; 356 break;
357 } 357 }
358 break; 358 break;
@@ -367,8 +367,8 @@ static void frontend_init(struct budget_patch* budget)
367 } else { 367 } else {
368 if (dvb_register_frontend(&budget->dvb_adapter, budget->dvb_frontend)) { 368 if (dvb_register_frontend(&budget->dvb_adapter, budget->dvb_frontend)) {
369 printk("budget-av: Frontend registration failed!\n"); 369 printk("budget-av: Frontend registration failed!\n");
370 if (budget->dvb_frontend->ops->release) 370 if (budget->dvb_frontend->ops.release)
371 budget->dvb_frontend->ops->release(budget->dvb_frontend); 371 budget->dvb_frontend->ops.release(budget->dvb_frontend);
372 budget->dvb_frontend = NULL; 372 budget->dvb_frontend = NULL;
373 } 373 }
374 } 374 }
diff --git a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c
index d98395fefc95..35761f13c12b 100644
--- a/drivers/media/dvb/ttpci/budget.c
+++ b/drivers/media/dvb/ttpci/budget.c
@@ -209,8 +209,8 @@ static int alps_bsrv2_tuner_set_params(struct dvb_frontend* fe, struct dvb_front
209 // NOTE: since we're using a prescaler of 2, we set the 209 // NOTE: since we're using a prescaler of 2, we set the
210 // divisor frequency to 62.5kHz and divide by 125 above 210 // divisor frequency to 62.5kHz and divide by 125 above
211 211
212 if (fe->ops->i2c_gate_ctrl) 212 if (fe->ops.i2c_gate_ctrl)
213 fe->ops->i2c_gate_ctrl(fe, 1); 213 fe->ops.i2c_gate_ctrl(fe, 1);
214 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; 214 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO;
215 return 0; 215 return 0;
216} 216}
@@ -236,8 +236,8 @@ static int alps_tdbe2_tuner_set_params(struct dvb_frontend* fe, struct dvb_front
236 data[2] = 0x85 | ((div >> 10) & 0x60); 236 data[2] = 0x85 | ((div >> 10) & 0x60);
237 data[3] = (params->frequency < 174000000 ? 0x88 : params->frequency < 470000000 ? 0x84 : 0x81); 237 data[3] = (params->frequency < 174000000 ? 0x88 : params->frequency < 470000000 ? 0x84 : 0x81);
238 238
239 if (fe->ops->i2c_gate_ctrl) 239 if (fe->ops.i2c_gate_ctrl)
240 fe->ops->i2c_gate_ctrl(fe, 1); 240 fe->ops.i2c_gate_ctrl(fe, 1);
241 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; 241 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO;
242 return 0; 242 return 0;
243} 243}
@@ -276,8 +276,8 @@ static int grundig_29504_401_tuner_set_params(struct dvb_frontend* fe, struct dv
276 data[2] = ((div >> 10) & 0x60) | cfg; 276 data[2] = ((div >> 10) & 0x60) | cfg;
277 data[3] = (cpump << 6) | band_select; 277 data[3] = (cpump << 6) | band_select;
278 278
279 if (fe->ops->i2c_gate_ctrl) 279 if (fe->ops.i2c_gate_ctrl)
280 fe->ops->i2c_gate_ctrl(fe, 1); 280 fe->ops.i2c_gate_ctrl(fe, 1);
281 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; 281 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO;
282 return 0; 282 return 0;
283} 283}
@@ -299,8 +299,8 @@ static int grundig_29504_451_tuner_set_params(struct dvb_frontend* fe, struct dv
299 data[2] = 0x8e; 299 data[2] = 0x8e;
300 data[3] = 0x00; 300 data[3] = 0x00;
301 301
302 if (fe->ops->i2c_gate_ctrl) 302 if (fe->ops.i2c_gate_ctrl)
303 fe->ops->i2c_gate_ctrl(fe, 1); 303 fe->ops.i2c_gate_ctrl(fe, 1);
304 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; 304 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO;
305 return 0; 305 return 0;
306} 306}
@@ -330,8 +330,8 @@ static int s5h1420_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend
330 else 330 else
331 data[3] = 0xc0; 331 data[3] = 0xc0;
332 332
333 if (fe->ops->i2c_gate_ctrl) 333 if (fe->ops.i2c_gate_ctrl)
334 fe->ops->i2c_gate_ctrl(fe, 1); 334 fe->ops.i2c_gate_ctrl(fe, 1);
335 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; 335 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO;
336 336
337 return 0; 337 return 0;
@@ -363,21 +363,21 @@ static void frontend_init(struct budget *budget)
363 // try the ALPS BSRV2 first of all 363 // try the ALPS BSRV2 first of all
364 budget->dvb_frontend = ves1x93_attach(&alps_bsrv2_config, &budget->i2c_adap); 364 budget->dvb_frontend = ves1x93_attach(&alps_bsrv2_config, &budget->i2c_adap);
365 if (budget->dvb_frontend) { 365 if (budget->dvb_frontend) {
366 budget->dvb_frontend->ops->tuner_ops.set_params = alps_bsrv2_tuner_set_params; 366 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params;
367 budget->dvb_frontend->ops->diseqc_send_master_cmd = budget_diseqc_send_master_cmd; 367 budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd;
368 budget->dvb_frontend->ops->diseqc_send_burst = budget_diseqc_send_burst; 368 budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst;
369 budget->dvb_frontend->ops->set_tone = budget_set_tone; 369 budget->dvb_frontend->ops.set_tone = budget_set_tone;
370 break; 370 break;
371 } 371 }
372 372
373 // try the ALPS BSRU6 now 373 // try the ALPS BSRU6 now
374 budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap); 374 budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap);
375 if (budget->dvb_frontend) { 375 if (budget->dvb_frontend) {
376 budget->dvb_frontend->ops->tuner_ops.set_params = alps_bsru6_tuner_set_params; 376 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
377 budget->dvb_frontend->tuner_priv = &budget->i2c_adap; 377 budget->dvb_frontend->tuner_priv = &budget->i2c_adap;
378 budget->dvb_frontend->ops->diseqc_send_master_cmd = budget_diseqc_send_master_cmd; 378 budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd;
379 budget->dvb_frontend->ops->diseqc_send_burst = budget_diseqc_send_burst; 379 budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst;
380 budget->dvb_frontend->ops->set_tone = budget_set_tone; 380 budget->dvb_frontend->ops.set_tone = budget_set_tone;
381 break; 381 break;
382 } 382 }
383 break; 383 break;
@@ -386,7 +386,7 @@ static void frontend_init(struct budget *budget)
386 386
387 budget->dvb_frontend = ves1820_attach(&alps_tdbe2_config, &budget->i2c_adap, read_pwm(budget)); 387 budget->dvb_frontend = ves1820_attach(&alps_tdbe2_config, &budget->i2c_adap, read_pwm(budget));
388 if (budget->dvb_frontend) { 388 if (budget->dvb_frontend) {
389 budget->dvb_frontend->ops->tuner_ops.set_params = alps_tdbe2_tuner_set_params; 389 budget->dvb_frontend->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params;
390 break; 390 break;
391 } 391 }
392 break; 392 break;
@@ -395,7 +395,7 @@ static void frontend_init(struct budget *budget)
395 395
396 budget->dvb_frontend = l64781_attach(&grundig_29504_401_config, &budget->i2c_adap); 396 budget->dvb_frontend = l64781_attach(&grundig_29504_401_config, &budget->i2c_adap);
397 if (budget->dvb_frontend) { 397 if (budget->dvb_frontend) {
398 budget->dvb_frontend->ops->tuner_ops.set_params = grundig_29504_401_tuner_set_params; 398 budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params;
399 break; 399 break;
400 } 400 }
401 break; 401 break;
@@ -403,26 +403,26 @@ static void frontend_init(struct budget *budget)
403 case 0x4f60: // Fujitsu Siemens Activy Budget-S PCI rev AL (stv0299/ALPS BSRU6(tsa5059)) 403 case 0x4f60: // Fujitsu Siemens Activy Budget-S PCI rev AL (stv0299/ALPS BSRU6(tsa5059))
404 budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap); 404 budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap);
405 if (budget->dvb_frontend) { 405 if (budget->dvb_frontend) {
406 budget->dvb_frontend->ops->tuner_ops.set_params = alps_bsru6_tuner_set_params; 406 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
407 budget->dvb_frontend->tuner_priv = &budget->i2c_adap; 407 budget->dvb_frontend->tuner_priv = &budget->i2c_adap;
408 budget->dvb_frontend->ops->set_voltage = siemens_budget_set_voltage; 408 budget->dvb_frontend->ops.set_voltage = siemens_budget_set_voltage;
409 budget->dvb_frontend->ops->dishnetwork_send_legacy_command = NULL; 409 budget->dvb_frontend->ops.dishnetwork_send_legacy_command = NULL;
410 } 410 }
411 break; 411 break;
412 412
413 case 0x4f61: // Fujitsu Siemens Activy Budget-S PCI rev GR (tda8083/Grundig 29504-451(tsa5522)) 413 case 0x4f61: // Fujitsu Siemens Activy Budget-S PCI rev GR (tda8083/Grundig 29504-451(tsa5522))
414 budget->dvb_frontend = tda8083_attach(&grundig_29504_451_config, &budget->i2c_adap); 414 budget->dvb_frontend = tda8083_attach(&grundig_29504_451_config, &budget->i2c_adap);
415 if (budget->dvb_frontend) { 415 if (budget->dvb_frontend) {
416 budget->dvb_frontend->ops->tuner_ops.set_params = grundig_29504_451_tuner_set_params; 416 budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params;
417 budget->dvb_frontend->ops->set_voltage = siemens_budget_set_voltage; 417 budget->dvb_frontend->ops.set_voltage = siemens_budget_set_voltage;
418 budget->dvb_frontend->ops->dishnetwork_send_legacy_command = NULL; 418 budget->dvb_frontend->ops.dishnetwork_send_legacy_command = NULL;
419 } 419 }
420 break; 420 break;
421 421
422 case 0x1016: // Hauppauge/TT Nova-S SE (samsung s5h1420/????(tda8260)) 422 case 0x1016: // Hauppauge/TT Nova-S SE (samsung s5h1420/????(tda8260))
423 budget->dvb_frontend = s5h1420_attach(&s5h1420_config, &budget->i2c_adap); 423 budget->dvb_frontend = s5h1420_attach(&s5h1420_config, &budget->i2c_adap);
424 if (budget->dvb_frontend) { 424 if (budget->dvb_frontend) {
425 budget->dvb_frontend->ops->tuner_ops.set_params = s5h1420_tuner_set_params; 425 budget->dvb_frontend->ops.tuner_ops.set_params = s5h1420_tuner_set_params;
426 if (lnbp21_attach(budget->dvb_frontend, &budget->i2c_adap, 0, 0)) { 426 if (lnbp21_attach(budget->dvb_frontend, &budget->i2c_adap, 0, 0)) {
427 printk("%s: No LNBP21 found!\n", __FUNCTION__); 427 printk("%s: No LNBP21 found!\n", __FUNCTION__);
428 goto error_out; 428 goto error_out;
@@ -445,8 +445,8 @@ static void frontend_init(struct budget *budget)
445 445
446error_out: 446error_out:
447 printk("budget: Frontend registration failed!\n"); 447 printk("budget: Frontend registration failed!\n");
448 if (budget->dvb_frontend->ops->release) 448 if (budget->dvb_frontend->ops.release)
449 budget->dvb_frontend->ops->release(budget->dvb_frontend); 449 budget->dvb_frontend->ops.release(budget->dvb_frontend);
450 budget->dvb_frontend = NULL; 450 budget->dvb_frontend = NULL;
451 return; 451 return;
452} 452}