diff options
Diffstat (limited to 'drivers/media/dvb/b2c2/flexcop-fe-tuner.c')
-rw-r--r-- | drivers/media/dvb/b2c2/flexcop-fe-tuner.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c index 21a9045b3ef6..fa7058108bf4 100644 --- a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c +++ b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c | |||
@@ -485,12 +485,16 @@ static struct stv0297_config alps_tdee4_stv0297_config = { | |||
485 | /* try to figure out the frontend, each card/box can have on of the following list */ | 485 | /* try to figure out the frontend, each card/box can have on of the following list */ |
486 | int flexcop_frontend_init(struct flexcop_device *fc) | 486 | int flexcop_frontend_init(struct flexcop_device *fc) |
487 | { | 487 | { |
488 | struct dvb_frontend_ops *ops; | ||
489 | |||
488 | /* try the sky v2.6 (stv0299/Samsung tbmu24112(sl1935)) */ | 490 | /* try the sky v2.6 (stv0299/Samsung tbmu24112(sl1935)) */ |
489 | if ((fc->fe = stv0299_attach(&samsung_tbmu24112_config, &fc->i2c_adap)) != NULL) { | 491 | if ((fc->fe = stv0299_attach(&samsung_tbmu24112_config, &fc->i2c_adap)) != NULL) { |
490 | fc->fe->ops->set_voltage = flexcop_set_voltage; | 492 | ops = fc->fe->ops; |
493 | |||
494 | ops->set_voltage = flexcop_set_voltage; | ||
491 | 495 | ||
492 | fc->fe_sleep = fc->fe->ops->sleep; | 496 | fc->fe_sleep = ops->sleep; |
493 | fc->fe->ops->sleep = flexcop_sleep; | 497 | ops->sleep = flexcop_sleep; |
494 | 498 | ||
495 | fc->dev_type = FC_SKY; | 499 | fc->dev_type = FC_SKY; |
496 | info("found the stv0299 at i2c address: 0x%02x",samsung_tbmu24112_config.demod_address); | 500 | info("found the stv0299 at i2c address: 0x%02x",samsung_tbmu24112_config.demod_address); |
@@ -522,15 +526,17 @@ int flexcop_frontend_init(struct flexcop_device *fc) | |||
522 | } else | 526 | } else |
523 | /* try the sky v2.3 (vp310/Samsung tbdu18132(tsa5059)) */ | 527 | /* try the sky v2.3 (vp310/Samsung tbdu18132(tsa5059)) */ |
524 | if ((fc->fe = vp310_attach(&skystar23_samsung_tbdu18132_config, &fc->i2c_adap)) != NULL) { | 528 | if ((fc->fe = vp310_attach(&skystar23_samsung_tbdu18132_config, &fc->i2c_adap)) != NULL) { |
525 | fc->fe->ops->diseqc_send_master_cmd = flexcop_diseqc_send_master_cmd; | 529 | ops = fc->fe->ops; |
526 | fc->fe->ops->diseqc_send_burst = flexcop_diseqc_send_burst; | 530 | |
527 | fc->fe->ops->set_tone = flexcop_set_tone; | 531 | ops->diseqc_send_master_cmd = flexcop_diseqc_send_master_cmd; |
528 | fc->fe->ops->set_voltage = flexcop_set_voltage; | 532 | ops->diseqc_send_burst = flexcop_diseqc_send_burst; |
533 | ops->set_tone = flexcop_set_tone; | ||
534 | ops->set_voltage = flexcop_set_voltage; | ||
529 | 535 | ||
530 | fc->fe_sleep = fc->fe->ops->sleep; | 536 | fc->fe_sleep = ops->sleep; |
531 | fc->fe->ops->sleep = flexcop_sleep; | 537 | ops->sleep = flexcop_sleep; |
532 | 538 | ||
533 | fc->dev_type = FC_SKY_OLD; | 539 | fc->dev_type = FC_SKY_OLD; |
534 | info("found the vp310 (aka mt312) at i2c address: 0x%02x",skystar23_samsung_tbdu18132_config.demod_address); | 540 | info("found the vp310 (aka mt312) at i2c address: 0x%02x",skystar23_samsung_tbdu18132_config.demod_address); |
535 | } | 541 | } |
536 | 542 | ||
@@ -540,8 +546,9 @@ int flexcop_frontend_init(struct flexcop_device *fc) | |||
540 | } else { | 546 | } else { |
541 | if (dvb_register_frontend(&fc->dvb_adapter, fc->fe)) { | 547 | if (dvb_register_frontend(&fc->dvb_adapter, fc->fe)) { |
542 | err("frontend registration failed!"); | 548 | err("frontend registration failed!"); |
543 | if (fc->fe->ops->release != NULL) | 549 | ops = fc->fe->ops; |
544 | fc->fe->ops->release(fc->fe); | 550 | if (ops->release != NULL) |
551 | ops->release(fc->fe); | ||
545 | fc->fe = NULL; | 552 | fc->fe = NULL; |
546 | return -EINVAL; | 553 | return -EINVAL; |
547 | } | 554 | } |