aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/ttpci/av7110.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/ttpci/av7110.c')
-rw-r--r--drivers/media/dvb/ttpci/av7110.c39
1 files changed, 22 insertions, 17 deletions
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index fa0bed6779b5..d195cf591081 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -1383,8 +1383,12 @@ static void dvb_unregister(struct av7110 *av7110)
1383 dvb_dmxdev_release(&av7110->dmxdev); 1383 dvb_dmxdev_release(&av7110->dmxdev);
1384 dvb_dmx_release(&av7110->demux); 1384 dvb_dmx_release(&av7110->demux);
1385 1385
1386 if (av7110->fe != NULL) 1386 if (av7110->fe != NULL) {
1387 dvb_unregister_frontend(av7110->fe); 1387 dvb_unregister_frontend(av7110->fe);
1388 dvb_detach(av7110->fe->ops.release_sec, av7110->fe);
1389 dvb_detach(av7110->fe->ops.tuner_ops.release, av7110->fe);
1390 dvb_detach(av7110->fe->ops.release, av7110->fe);
1391 }
1388 dvb_unregister_device(av7110->osd_dev); 1392 dvb_unregister_device(av7110->osd_dev);
1389 av7110_av_unregister(av7110); 1393 av7110_av_unregister(av7110);
1390 av7110_ca_unregister(av7110); 1394 av7110_ca_unregister(av7110);
@@ -2077,7 +2081,7 @@ static int frontend_init(struct av7110 *av7110)
2077 if (av7110->dev->pci->subsystem_vendor == 0x110a) { 2081 if (av7110->dev->pci->subsystem_vendor == 0x110a) {
2078 switch(av7110->dev->pci->subsystem_device) { 2082 switch(av7110->dev->pci->subsystem_device) {
2079 case 0x0000: // Fujitsu/Siemens DVB-Cable (ves1820/Philips CD1516(??)) 2083 case 0x0000: // Fujitsu/Siemens DVB-Cable (ves1820/Philips CD1516(??))
2080 av7110->fe = ves1820_attach(&philips_cd1516_config, 2084 av7110->fe = dvb_attach(ves1820_attach, &philips_cd1516_config,
2081 &av7110->i2c_adap, read_pwm(av7110)); 2085 &av7110->i2c_adap, read_pwm(av7110));
2082 if (av7110->fe) { 2086 if (av7110->fe) {
2083 av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params; 2087 av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params;
@@ -2092,7 +2096,7 @@ static int frontend_init(struct av7110 *av7110)
2092 case 0x1002: // Hauppauge/TT WinTV DVB-S rev1.3SE 2096 case 0x1002: // Hauppauge/TT WinTV DVB-S rev1.3SE
2093 2097
2094 // try the ALPS BSRV2 first of all 2098 // try the ALPS BSRV2 first of all
2095 av7110->fe = ves1x93_attach(&alps_bsrv2_config, &av7110->i2c_adap); 2099 av7110->fe = dvb_attach(ves1x93_attach, &alps_bsrv2_config, &av7110->i2c_adap);
2096 if (av7110->fe) { 2100 if (av7110->fe) {
2097 av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; 2101 av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params;
2098 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; 2102 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd;
@@ -2103,7 +2107,7 @@ static int frontend_init(struct av7110 *av7110)
2103 } 2107 }
2104 2108
2105 // try the ALPS BSRU6 now 2109 // try the ALPS BSRU6 now
2106 av7110->fe = stv0299_attach(&alps_bsru6_config, &av7110->i2c_adap); 2110 av7110->fe = dvb_attach(stv0299_attach, &alps_bsru6_config, &av7110->i2c_adap);
2107 if (av7110->fe) { 2111 if (av7110->fe) {
2108 av7110->fe->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; 2112 av7110->fe->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
2109 av7110->fe->tuner_priv = &av7110->i2c_adap; 2113 av7110->fe->tuner_priv = &av7110->i2c_adap;
@@ -2116,7 +2120,7 @@ static int frontend_init(struct av7110 *av7110)
2116 } 2120 }
2117 2121
2118 // Try the grundig 29504-451 2122 // Try the grundig 29504-451
2119 av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap); 2123 av7110->fe = dvb_attach(tda8083_attach, &grundig_29504_451_config, &av7110->i2c_adap);
2120 if (av7110->fe) { 2124 if (av7110->fe) {
2121 av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; 2125 av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params;
2122 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; 2126 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd;
@@ -2130,7 +2134,7 @@ static int frontend_init(struct av7110 *av7110)
2130 switch(av7110->dev->pci->subsystem_device) { 2134 switch(av7110->dev->pci->subsystem_device) {
2131 case 0x0000: 2135 case 0x0000:
2132 /* Siemens DVB-C (full-length card) VES1820/Philips CD1516 */ 2136 /* Siemens DVB-C (full-length card) VES1820/Philips CD1516 */
2133 av7110->fe = ves1820_attach(&philips_cd1516_config, &av7110->i2c_adap, 2137 av7110->fe = dvb_attach(ves1820_attach, &philips_cd1516_config, &av7110->i2c_adap,
2134 read_pwm(av7110)); 2138 read_pwm(av7110));
2135 if (av7110->fe) { 2139 if (av7110->fe) {
2136 av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params; 2140 av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params;
@@ -2138,7 +2142,7 @@ static int frontend_init(struct av7110 *av7110)
2138 break; 2142 break;
2139 case 0x0003: 2143 case 0x0003:
2140 /* Hauppauge DVB-C 2.1 VES1820/ALPS TDBE2 */ 2144 /* Hauppauge DVB-C 2.1 VES1820/ALPS TDBE2 */
2141 av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, 2145 av7110->fe = dvb_attach(ves1820_attach, &alps_tdbe2_config, &av7110->i2c_adap,
2142 read_pwm(av7110)); 2146 read_pwm(av7110));
2143 if (av7110->fe) { 2147 if (av7110->fe) {
2144 av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; 2148 av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params;
@@ -2150,7 +2154,7 @@ static int frontend_init(struct av7110 *av7110)
2150 case 0x0001: // Hauppauge/TT Nexus-T premium rev1.X 2154 case 0x0001: // Hauppauge/TT Nexus-T premium rev1.X
2151 2155
2152 // ALPS TDLB7 2156 // ALPS TDLB7
2153 av7110->fe = sp8870_attach(&alps_tdlb7_config, &av7110->i2c_adap); 2157 av7110->fe = dvb_attach(sp8870_attach, &alps_tdlb7_config, &av7110->i2c_adap);
2154 if (av7110->fe) { 2158 if (av7110->fe) {
2155 av7110->fe->ops.tuner_ops.set_params = alps_tdlb7_tuner_set_params; 2159 av7110->fe->ops.tuner_ops.set_params = alps_tdlb7_tuner_set_params;
2156 } 2160 }
@@ -2158,7 +2162,7 @@ static int frontend_init(struct av7110 *av7110)
2158 2162
2159 case 0x0002: // Hauppauge/TT DVB-C premium rev2.X 2163 case 0x0002: // Hauppauge/TT DVB-C premium rev2.X
2160 2164
2161 av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110)); 2165 av7110->fe = dvb_attach(ves1820_attach, &alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110));
2162 if (av7110->fe) { 2166 if (av7110->fe) {
2163 av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; 2167 av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params;
2164 } 2168 }
@@ -2166,7 +2170,7 @@ static int frontend_init(struct av7110 *av7110)
2166 2170
2167 case 0x0004: // Galaxis DVB-S rev1.3 2171 case 0x0004: // Galaxis DVB-S rev1.3
2168 /* ALPS BSRV2 */ 2172 /* ALPS BSRV2 */
2169 av7110->fe = ves1x93_attach(&alps_bsrv2_config, &av7110->i2c_adap); 2173 av7110->fe = dvb_attach(ves1x93_attach, &alps_bsrv2_config, &av7110->i2c_adap);
2170 if (av7110->fe) { 2174 if (av7110->fe) {
2171 av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; 2175 av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params;
2172 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; 2176 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd;
@@ -2178,7 +2182,7 @@ static int frontend_init(struct av7110 *av7110)
2178 2182
2179 case 0x0006: /* Fujitsu-Siemens DVB-S rev 1.6 */ 2183 case 0x0006: /* Fujitsu-Siemens DVB-S rev 1.6 */
2180 /* Grundig 29504-451 */ 2184 /* Grundig 29504-451 */
2181 av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap); 2185 av7110->fe = dvb_attach(tda8083_attach, &grundig_29504_451_config, &av7110->i2c_adap);
2182 if (av7110->fe) { 2186 if (av7110->fe) {
2183 av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; 2187 av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params;
2184 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; 2188 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd;
@@ -2190,7 +2194,7 @@ static int frontend_init(struct av7110 *av7110)
2190 2194
2191 case 0x0008: // Hauppauge/TT DVB-T 2195 case 0x0008: // Hauppauge/TT DVB-T
2192 2196
2193 av7110->fe = l64781_attach(&grundig_29504_401_config, &av7110->i2c_adap); 2197 av7110->fe = dvb_attach(l64781_attach, &grundig_29504_401_config, &av7110->i2c_adap);
2194 if (av7110->fe) { 2198 if (av7110->fe) {
2195 av7110->fe->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params; 2199 av7110->fe->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params;
2196 } 2200 }
@@ -2198,7 +2202,7 @@ static int frontend_init(struct av7110 *av7110)
2198 2202
2199 case 0x000A: // Hauppauge/TT Nexus-CA rev1.X 2203 case 0x000A: // Hauppauge/TT Nexus-CA rev1.X
2200 2204
2201 av7110->fe = stv0297_attach(&nexusca_stv0297_config, &av7110->i2c_adap); 2205 av7110->fe = dvb_attach(stv0297_attach, &nexusca_stv0297_config, &av7110->i2c_adap);
2202 if (av7110->fe) { 2206 if (av7110->fe) {
2203 av7110->fe->ops.tuner_ops.set_params = nexusca_stv0297_tuner_set_params; 2207 av7110->fe->ops.tuner_ops.set_params = nexusca_stv0297_tuner_set_params;
2204 2208
@@ -2214,12 +2218,12 @@ static int frontend_init(struct av7110 *av7110)
2214 2218
2215 case 0x000E: /* Hauppauge/TT Nexus-S rev 2.3 */ 2219 case 0x000E: /* Hauppauge/TT Nexus-S rev 2.3 */
2216 /* ALPS BSBE1 */ 2220 /* ALPS BSBE1 */
2217 av7110->fe = stv0299_attach(&alps_bsbe1_config, &av7110->i2c_adap); 2221 av7110->fe = dvb_attach(stv0299_attach, &alps_bsbe1_config, &av7110->i2c_adap);
2218 if (av7110->fe) { 2222 if (av7110->fe) {
2219 av7110->fe->ops.tuner_ops.set_params = alps_bsbe1_tuner_set_params; 2223 av7110->fe->ops.tuner_ops.set_params = alps_bsbe1_tuner_set_params;
2220 av7110->fe->tuner_priv = &av7110->i2c_adap; 2224 av7110->fe->tuner_priv = &av7110->i2c_adap;
2221 2225
2222 if (lnbp21_attach(av7110->fe, &av7110->i2c_adap, 0, 0) == NULL) { 2226 if (dvb_attach(lnbp21_attach, av7110->fe, &av7110->i2c_adap, 0, 0) == NULL) {
2223 printk("dvb-ttpci: LNBP21 not found!\n"); 2227 printk("dvb-ttpci: LNBP21 not found!\n");
2224 if (av7110->fe->ops.release) 2228 if (av7110->fe->ops.release)
2225 av7110->fe->ops.release(av7110->fe); 2229 av7110->fe->ops.release(av7110->fe);
@@ -2255,8 +2259,9 @@ static int frontend_init(struct av7110 *av7110)
2255 ret = dvb_register_frontend(&av7110->dvb_adapter, av7110->fe); 2259 ret = dvb_register_frontend(&av7110->dvb_adapter, av7110->fe);
2256 if (ret < 0) { 2260 if (ret < 0) {
2257 printk("av7110: Frontend registration failed!\n"); 2261 printk("av7110: Frontend registration failed!\n");
2258 if (av7110->fe->ops.release) 2262 dvb_detach(av7110->fe->ops.release_sec, av7110->fe);
2259 av7110->fe->ops.release(av7110->fe); 2263 dvb_detach(av7110->fe->ops.tuner_ops.release, av7110->fe);
2264 dvb_detach(av7110->fe->ops.release, av7110->fe);
2260 av7110->fe = NULL; 2265 av7110->fe = NULL;
2261 } 2266 }
2262 } 2267 }