aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/ttpci
diff options
context:
space:
mode:
authorAndrew de Quincey <adq_dvb@lidskialf.net>2006-04-20 11:01:47 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-25 00:59:38 -0400
commit6b3ccab75ce082f7d63a43903ebd75da4266f77e (patch)
tree866d08667706310aaf7151a9802595fb44a7b63f /drivers/media/dvb/ttpci
parent159f8a6eda8c2ee359bb87bf62be70da2da14918 (diff)
V4L/DVB (3895): Additional frontend_init safety checks
Don't try and set the tuner ops if the demod was not detected. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/ttpci')
-rw-r--r--drivers/media/dvb/ttpci/av7110.c24
-rw-r--r--drivers/media/dvb/ttpci/budget-av.c4
2 files changed, 22 insertions, 6 deletions
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index 939a493b5251..5f976d5eda42 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -2083,7 +2083,9 @@ static int frontend_init(struct av7110 *av7110)
2083 case 0x0000: // Fujitsu/Siemens DVB-Cable (ves1820/Philips CD1516(??)) 2083 case 0x0000: // Fujitsu/Siemens DVB-Cable (ves1820/Philips CD1516(??))
2084 av7110->fe = ves1820_attach(&philips_cd1516_config, 2084 av7110->fe = ves1820_attach(&philips_cd1516_config,
2085 &av7110->i2c_adap, read_pwm(av7110)); 2085 &av7110->i2c_adap, read_pwm(av7110));
2086 av7110->fe->ops->tuner_ops.set_params = philips_cd1516_tuner_set_params; 2086 if (av7110->fe) {
2087 av7110->fe->ops->tuner_ops.set_params = philips_cd1516_tuner_set_params;
2088 }
2087 break; 2089 break;
2088 } 2090 }
2089 2091
@@ -2134,13 +2136,17 @@ static int frontend_init(struct av7110 *av7110)
2134 /* Siemens DVB-C (full-length card) VES1820/Philips CD1516 */ 2136 /* Siemens DVB-C (full-length card) VES1820/Philips CD1516 */
2135 av7110->fe = ves1820_attach(&philips_cd1516_config, &av7110->i2c_adap, 2137 av7110->fe = ves1820_attach(&philips_cd1516_config, &av7110->i2c_adap,
2136 read_pwm(av7110)); 2138 read_pwm(av7110));
2137 av7110->fe->ops->tuner_ops.set_params = philips_cd1516_tuner_set_params; 2139 if (av7110->fe) {
2140 av7110->fe->ops->tuner_ops.set_params = philips_cd1516_tuner_set_params;
2141 }
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 = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap,
2142 read_pwm(av7110)); 2146 read_pwm(av7110));
2143 av7110->fe->ops->tuner_ops.set_params = alps_tdbe2_tuner_set_params; 2147 if (av7110->fe) {
2148 av7110->fe->ops->tuner_ops.set_params = alps_tdbe2_tuner_set_params;
2149 }
2144 break; 2150 break;
2145 } 2151 }
2146 break; 2152 break;
@@ -2149,13 +2155,17 @@ static int frontend_init(struct av7110 *av7110)
2149 2155
2150 // ALPS TDLB7 2156 // ALPS TDLB7
2151 av7110->fe = sp8870_attach(&alps_tdlb7_config, &av7110->i2c_adap); 2157 av7110->fe = sp8870_attach(&alps_tdlb7_config, &av7110->i2c_adap);
2152 av7110->fe->ops->tuner_ops.set_params = alps_tdlb7_tuner_set_params; 2158 if (av7110->fe) {
2159 av7110->fe->ops->tuner_ops.set_params = alps_tdlb7_tuner_set_params;
2160 }
2153 break; 2161 break;
2154 2162
2155 case 0x0002: // Hauppauge/TT DVB-C premium rev2.X 2163 case 0x0002: // Hauppauge/TT DVB-C premium rev2.X
2156 2164
2157 av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110)); 2165 av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110));
2158 av7110->fe->ops->tuner_ops.set_params = alps_tdbe2_tuner_set_params; 2166 if (av7110->fe) {
2167 av7110->fe->ops->tuner_ops.set_params = alps_tdbe2_tuner_set_params;
2168 }
2159 break; 2169 break;
2160 2170
2161 case 0x0004: // Galaxis DVB-S rev1.3 2171 case 0x0004: // Galaxis DVB-S rev1.3
@@ -2185,7 +2195,9 @@ static int frontend_init(struct av7110 *av7110)
2185 case 0x0008: // Hauppauge/TT DVB-T 2195 case 0x0008: // Hauppauge/TT DVB-T
2186 2196
2187 av7110->fe = l64781_attach(&grundig_29504_401_config, &av7110->i2c_adap); 2197 av7110->fe = l64781_attach(&grundig_29504_401_config, &av7110->i2c_adap);
2188 av7110->fe->ops->tuner_ops.set_params = grundig_29504_401_tuner_set_params; 2198 if (av7110->fe) {
2199 av7110->fe->ops->tuner_ops.set_params = grundig_29504_401_tuner_set_params;
2200 }
2189 break; 2201 break;
2190 2202
2191 case 0x000A: // Hauppauge/TT Nexus-CA rev1.X 2203 case 0x000A: // Hauppauge/TT Nexus-CA rev1.X
diff --git a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c
index 9bd069e4e11a..68004187860f 100644
--- a/drivers/media/dvb/ttpci/budget-av.c
+++ b/drivers/media/dvb/ttpci/budget-av.c
@@ -1113,6 +1113,10 @@ static void frontend_init(struct budget_av *budget_av)
1113 case SUBID_DVBT_CINERGY1200: 1113 case SUBID_DVBT_CINERGY1200:
1114 fe = tda10046_attach(&philips_tu1216_config, 1114 fe = tda10046_attach(&philips_tu1216_config,
1115 &budget_av->budget.i2c_adap); 1115 &budget_av->budget.i2c_adap);
1116 if (fe) {
1117 fe->ops->tuner_ops.init = philips_tu1216_tuner_init;
1118 fe->ops->tuner_ops.set_params = philips_tu1216_tuner_set_params;
1119 }
1116 break; 1120 break;
1117 } 1121 }
1118 1122