aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/b2c2
diff options
context:
space:
mode:
authorAndrew de Quincey <adq_dvb@lidskialf.net>2006-08-08 08:10:08 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-26 10:53:25 -0400
commit2bfe031df6bd5e3b8e503eba8e3b6461d7c2c27e (patch)
tree2d7288c2221fb6f7ef98ef7a1ee3fef3f04cf87e /drivers/media/dvb/b2c2
parentd995506062c974133ba66d0822e58a923d4d74d9 (diff)
V4L/DVB (4386): Convert DVB devices to use dvb_attach()
Only devices using > 1 frontend were ported; ones which did not are left using static binding. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Acked-by: Michael Krufky <mkrufky@linuxtv.org> Acked-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/b2c2')
-rw-r--r--drivers/media/dvb/b2c2/flexcop-fe-tuner.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
index 816e700ae14..e2d2e65dea5 100644
--- a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
+++ b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
@@ -505,7 +505,7 @@ int flexcop_frontend_init(struct flexcop_device *fc)
505 struct dvb_frontend_ops *ops; 505 struct dvb_frontend_ops *ops;
506 506
507 /* try the sky v2.6 (stv0299/Samsung tbmu24112(sl1935)) */ 507 /* try the sky v2.6 (stv0299/Samsung tbmu24112(sl1935)) */
508 if ((fc->fe = stv0299_attach(&samsung_tbmu24112_config, &fc->i2c_adap)) != NULL) { 508 if ((fc->fe = dvb_attach(stv0299_attach, &samsung_tbmu24112_config, &fc->i2c_adap)) != NULL) {
509 ops = &fc->fe->ops; 509 ops = &fc->fe->ops;
510 510
511 ops->tuner_ops.set_params = samsung_tbmu24112_tuner_set_params; 511 ops->tuner_ops.set_params = samsung_tbmu24112_tuner_set_params;
@@ -519,36 +519,36 @@ int flexcop_frontend_init(struct flexcop_device *fc)
519 info("found the stv0299 at i2c address: 0x%02x",samsung_tbmu24112_config.demod_address); 519 info("found the stv0299 at i2c address: 0x%02x",samsung_tbmu24112_config.demod_address);
520 } else 520 } else
521 /* try the air dvb-t (mt352/Samsung tdtc9251dh0(??)) */ 521 /* try the air dvb-t (mt352/Samsung tdtc9251dh0(??)) */
522 if ((fc->fe = mt352_attach(&samsung_tdtc9251dh0_config, &fc->i2c_adap)) != NULL ) { 522 if ((fc->fe = dvb_attach(mt352_attach, &samsung_tdtc9251dh0_config, &fc->i2c_adap)) != NULL ) {
523 fc->dev_type = FC_AIR_DVB; 523 fc->dev_type = FC_AIR_DVB;
524 fc->fe->ops.tuner_ops.calc_regs = samsung_tdtc9251dh0_calc_regs; 524 fc->fe->ops.tuner_ops.calc_regs = samsung_tdtc9251dh0_calc_regs;
525 info("found the mt352 at i2c address: 0x%02x",samsung_tdtc9251dh0_config.demod_address); 525 info("found the mt352 at i2c address: 0x%02x",samsung_tdtc9251dh0_config.demod_address);
526 } else 526 } else
527 /* try the air atsc 2nd generation (nxt2002) */ 527 /* try the air atsc 2nd generation (nxt2002) */
528 if ((fc->fe = nxt200x_attach(&samsung_tbmv_config, &fc->i2c_adap)) != NULL) { 528 if ((fc->fe = dvb_attach(nxt200x_attach, &samsung_tbmv_config, &fc->i2c_adap)) != NULL) {
529 fc->dev_type = FC_AIR_ATSC2; 529 fc->dev_type = FC_AIR_ATSC2;
530 dvb_attach(dvb_pll_attach, fc->fe, 0x61, &fc->i2c_adap, &dvb_pll_samsung_tbmv); 530 dvb_attach(dvb_pll_attach, fc->fe, 0x61, &fc->i2c_adap, &dvb_pll_samsung_tbmv);
531 info("found the nxt2002 at i2c address: 0x%02x",samsung_tbmv_config.demod_address); 531 info("found the nxt2002 at i2c address: 0x%02x",samsung_tbmv_config.demod_address);
532 } else 532 } else
533 /* try the air atsc 3nd generation (lgdt3303) */ 533 /* try the air atsc 3nd generation (lgdt3303) */
534 if ((fc->fe = lgdt330x_attach(&air2pc_atsc_hd5000_config, &fc->i2c_adap)) != NULL) { 534 if ((fc->fe = dvb_attach(lgdt330x_attach, &air2pc_atsc_hd5000_config, &fc->i2c_adap)) != NULL) {
535 fc->dev_type = FC_AIR_ATSC3; 535 fc->dev_type = FC_AIR_ATSC3;
536 fc->fe->ops.tuner_ops.set_params = lgdt3303_tuner_set_params; 536 fc->fe->ops.tuner_ops.set_params = lgdt3303_tuner_set_params;
537 info("found the lgdt3303 at i2c address: 0x%02x",air2pc_atsc_hd5000_config.demod_address); 537 info("found the lgdt3303 at i2c address: 0x%02x",air2pc_atsc_hd5000_config.demod_address);
538 } else 538 } else
539 /* try the air atsc 1nd generation (bcm3510)/panasonic ct10s */ 539 /* try the air atsc 1nd generation (bcm3510)/panasonic ct10s */
540 if ((fc->fe = bcm3510_attach(&air2pc_atsc_first_gen_config, &fc->i2c_adap)) != NULL) { 540 if ((fc->fe = dvb_attach(bcm3510_attach, &air2pc_atsc_first_gen_config, &fc->i2c_adap)) != NULL) {
541 fc->dev_type = FC_AIR_ATSC1; 541 fc->dev_type = FC_AIR_ATSC1;
542 info("found the bcm3510 at i2c address: 0x%02x",air2pc_atsc_first_gen_config.demod_address); 542 info("found the bcm3510 at i2c address: 0x%02x",air2pc_atsc_first_gen_config.demod_address);
543 } else 543 } else
544 /* try the cable dvb (stv0297) */ 544 /* try the cable dvb (stv0297) */
545 if ((fc->fe = stv0297_attach(&alps_tdee4_stv0297_config, &fc->i2c_adap)) != NULL) { 545 if ((fc->fe = dvb_attach(stv0297_attach, &alps_tdee4_stv0297_config, &fc->i2c_adap)) != NULL) {
546 fc->dev_type = FC_CABLE; 546 fc->dev_type = FC_CABLE;
547 fc->fe->ops.tuner_ops.set_params = alps_tdee4_stv0297_tuner_set_params; 547 fc->fe->ops.tuner_ops.set_params = alps_tdee4_stv0297_tuner_set_params;
548 info("found the stv0297 at i2c address: 0x%02x",alps_tdee4_stv0297_config.demod_address); 548 info("found the stv0297 at i2c address: 0x%02x",alps_tdee4_stv0297_config.demod_address);
549 } else 549 } else
550 /* try the sky v2.3 (vp310/Samsung tbdu18132(tsa5059)) */ 550 /* try the sky v2.3 (vp310/Samsung tbdu18132(tsa5059)) */
551 if ((fc->fe = vp310_mt312_attach(&skystar23_samsung_tbdu18132_config, &fc->i2c_adap)) != NULL) { 551 if ((fc->fe = dvb_attach(vp310_mt312_attach, &skystar23_samsung_tbdu18132_config, &fc->i2c_adap)) != NULL) {
552 ops = &fc->fe->ops; 552 ops = &fc->fe->ops;
553 553
554 ops->tuner_ops.set_params = skystar23_samsung_tbdu18132_tuner_set_params; 554 ops->tuner_ops.set_params = skystar23_samsung_tbdu18132_tuner_set_params;
@@ -571,9 +571,9 @@ int flexcop_frontend_init(struct flexcop_device *fc)
571 } else { 571 } else {
572 if (dvb_register_frontend(&fc->dvb_adapter, fc->fe)) { 572 if (dvb_register_frontend(&fc->dvb_adapter, fc->fe)) {
573 err("frontend registration failed!"); 573 err("frontend registration failed!");
574 ops = &fc->fe->ops; 574 dvb_detach(fc->fe->ops.release_sec, fc->fe);
575 if (ops->release != NULL) 575 dvb_detach(fc->fe->ops.tuner_ops.release, fc->fe);
576 ops->release(fc->fe); 576 dvb_detach(fc->fe->ops.release, fc->fe);
577 fc->fe = NULL; 577 fc->fe = NULL;
578 return -EINVAL; 578 return -EINVAL;
579 } 579 }
@@ -584,8 +584,12 @@ int flexcop_frontend_init(struct flexcop_device *fc)
584 584
585void flexcop_frontend_exit(struct flexcop_device *fc) 585void flexcop_frontend_exit(struct flexcop_device *fc)
586{ 586{
587 if (fc->init_state & FC_STATE_FE_INIT) 587 if (fc->init_state & FC_STATE_FE_INIT) {
588 dvb_unregister_frontend(fc->fe); 588 dvb_unregister_frontend(fc->fe);
589 dvb_detach(fc->fe->ops.release_sec, fc->fe);
590 dvb_detach(fc->fe->ops.tuner_ops.release, fc->fe);
591 dvb_detach(fc->fe->ops.release, fc->fe);
592 }
589 593
590 fc->init_state &= ~FC_STATE_FE_INIT; 594 fc->init_state &= ~FC_STATE_FE_INIT;
591} 595}