aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/dvb/dvb-usb/dib0700_devices.c37
1 files changed, 30 insertions, 7 deletions
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c
index a56b9ef3c03c..f291fb55f1be 100644
--- a/drivers/media/dvb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c
@@ -262,7 +262,12 @@ static int stk7700P2_frontend_attach(struct dvb_usb_adapter *adap)
262 msleep(10); 262 msleep(10);
263 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); 263 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1);
264 msleep(10); 264 msleep(10);
265 dib7000p_i2c_enumeration(&adap->dev->i2c_adap,1,18,stk7700d_dib7000p_mt2266_config); 265 if (dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 1, 18,
266 stk7700d_dib7000p_mt2266_config)
267 != 0) {
268 err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n", __func__);
269 return -ENODEV;
270 }
266 } 271 }
267 272
268 adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap,0x80+(adap->id << 1), 273 adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap,0x80+(adap->id << 1),
@@ -284,7 +289,12 @@ static int stk7700d_frontend_attach(struct dvb_usb_adapter *adap)
284 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); 289 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1);
285 msleep(10); 290 msleep(10);
286 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); 291 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1);
287 dib7000p_i2c_enumeration(&adap->dev->i2c_adap,2,18,stk7700d_dib7000p_mt2266_config); 292 if (dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 2, 18,
293 stk7700d_dib7000p_mt2266_config)
294 != 0) {
295 err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n", __func__);
296 return -ENODEV;
297 }
288 } 298 }
289 299
290 adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap,0x80+(adap->id << 1), 300 adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap,0x80+(adap->id << 1),
@@ -421,8 +431,12 @@ static int stk7700ph_frontend_attach(struct dvb_usb_adapter *adap)
421 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); 431 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1);
422 msleep(10); 432 msleep(10);
423 433
424 dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 1, 18, 434 if (dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 1, 18,
425 &stk7700ph_dib7700_xc3028_config); 435 &stk7700ph_dib7700_xc3028_config) != 0) {
436 err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n",
437 __func__);
438 return -ENODEV;
439 }
426 440
427 adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, 441 adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80,
428 &stk7700ph_dib7700_xc3028_config); 442 &stk7700ph_dib7700_xc3028_config);
@@ -1187,8 +1201,12 @@ static int stk7070p_frontend_attach(struct dvb_usb_adapter *adap)
1187 msleep(10); 1201 msleep(10);
1188 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); 1202 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1);
1189 1203
1190 dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 1, 18, 1204 if (dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 1, 18,
1191 &dib7070p_dib7000p_config); 1205 &dib7070p_dib7000p_config) != 0) {
1206 err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n",
1207 __func__);
1208 return -ENODEV;
1209 }
1192 1210
1193 adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, 1211 adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80,
1194 &dib7070p_dib7000p_config); 1212 &dib7070p_dib7000p_config);
@@ -1244,7 +1262,12 @@ static int stk7070pd_frontend_attach0(struct dvb_usb_adapter *adap)
1244 msleep(10); 1262 msleep(10);
1245 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); 1263 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1);
1246 1264
1247 dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 2, 18, stk7070pd_dib7000p_config); 1265 if (dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 2, 18,
1266 stk7070pd_dib7000p_config) != 0) {
1267 err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n",
1268 __func__);
1269 return -ENODEV;
1270 }
1248 1271
1249 adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, &stk7070pd_dib7000p_config[0]); 1272 adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, &stk7070pd_dib7000p_config[0]);
1250 return adap->fe == NULL ? -ENODEV : 0; 1273 return adap->fe == NULL ? -ENODEV : 0;