aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/ttpci/budget.c
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/ttpci/budget.c
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/ttpci/budget.c')
-rw-r--r--drivers/media/dvb/ttpci/budget.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c
index c21ee5a05fe8..19beb11f9664 100644
--- a/drivers/media/dvb/ttpci/budget.c
+++ b/drivers/media/dvb/ttpci/budget.c
@@ -361,7 +361,7 @@ static void frontend_init(struct budget *budget)
361 case 0x1003: // Hauppauge/TT Nova budget (stv0299/ALPS BSRU6(tsa5059) OR ves1893/ALPS BSRV2(sp5659)) 361 case 0x1003: // Hauppauge/TT Nova budget (stv0299/ALPS BSRU6(tsa5059) OR ves1893/ALPS BSRV2(sp5659))
362 case 0x1013: 362 case 0x1013:
363 // try the ALPS BSRV2 first of all 363 // try the ALPS BSRV2 first of all
364 budget->dvb_frontend = ves1x93_attach(&alps_bsrv2_config, &budget->i2c_adap); 364 budget->dvb_frontend = dvb_attach(ves1x93_attach, &alps_bsrv2_config, &budget->i2c_adap);
365 if (budget->dvb_frontend) { 365 if (budget->dvb_frontend) {
366 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; 366 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params;
367 budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd; 367 budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd;
@@ -371,7 +371,7 @@ static void frontend_init(struct budget *budget)
371 } 371 }
372 372
373 // try the ALPS BSRU6 now 373 // try the ALPS BSRU6 now
374 budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap); 374 budget->dvb_frontend = dvb_attach(stv0299_attach, &alps_bsru6_config, &budget->i2c_adap);
375 if (budget->dvb_frontend) { 375 if (budget->dvb_frontend) {
376 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; 376 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
377 budget->dvb_frontend->tuner_priv = &budget->i2c_adap; 377 budget->dvb_frontend->tuner_priv = &budget->i2c_adap;
@@ -381,7 +381,7 @@ static void frontend_init(struct budget *budget)
381 381
382 case 0x1004: // Hauppauge/TT DVB-C budget (ves1820/ALPS TDBE2(sp5659)) 382 case 0x1004: // Hauppauge/TT DVB-C budget (ves1820/ALPS TDBE2(sp5659))
383 383
384 budget->dvb_frontend = ves1820_attach(&alps_tdbe2_config, &budget->i2c_adap, read_pwm(budget)); 384 budget->dvb_frontend = dvb_attach(ves1820_attach, &alps_tdbe2_config, &budget->i2c_adap, read_pwm(budget));
385 if (budget->dvb_frontend) { 385 if (budget->dvb_frontend) {
386 budget->dvb_frontend->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; 386 budget->dvb_frontend->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params;
387 break; 387 break;
@@ -390,7 +390,7 @@ static void frontend_init(struct budget *budget)
390 390
391 case 0x1005: // Hauppauge/TT Nova-T budget (L64781/Grundig 29504-401(tsa5060)) 391 case 0x1005: // Hauppauge/TT Nova-T budget (L64781/Grundig 29504-401(tsa5060))
392 392
393 budget->dvb_frontend = l64781_attach(&grundig_29504_401_config, &budget->i2c_adap); 393 budget->dvb_frontend = dvb_attach(l64781_attach, &grundig_29504_401_config, &budget->i2c_adap);
394 if (budget->dvb_frontend) { 394 if (budget->dvb_frontend) {
395 budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params; 395 budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params;
396 break; 396 break;
@@ -398,7 +398,7 @@ static void frontend_init(struct budget *budget)
398 break; 398 break;
399 399
400 case 0x4f60: // Fujitsu Siemens Activy Budget-S PCI rev AL (stv0299/ALPS BSRU6(tsa5059)) 400 case 0x4f60: // Fujitsu Siemens Activy Budget-S PCI rev AL (stv0299/ALPS BSRU6(tsa5059))
401 budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap); 401 budget->dvb_frontend = dvb_attach(stv0299_attach, &alps_bsru6_config, &budget->i2c_adap);
402 if (budget->dvb_frontend) { 402 if (budget->dvb_frontend) {
403 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; 403 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
404 budget->dvb_frontend->tuner_priv = &budget->i2c_adap; 404 budget->dvb_frontend->tuner_priv = &budget->i2c_adap;
@@ -408,7 +408,7 @@ static void frontend_init(struct budget *budget)
408 break; 408 break;
409 409
410 case 0x4f61: // Fujitsu Siemens Activy Budget-S PCI rev GR (tda8083/Grundig 29504-451(tsa5522)) 410 case 0x4f61: // Fujitsu Siemens Activy Budget-S PCI rev GR (tda8083/Grundig 29504-451(tsa5522))
411 budget->dvb_frontend = tda8083_attach(&grundig_29504_451_config, &budget->i2c_adap); 411 budget->dvb_frontend = dvb_attach(tda8083_attach, &grundig_29504_451_config, &budget->i2c_adap);
412 if (budget->dvb_frontend) { 412 if (budget->dvb_frontend) {
413 budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; 413 budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params;
414 budget->dvb_frontend->ops.set_voltage = siemens_budget_set_voltage; 414 budget->dvb_frontend->ops.set_voltage = siemens_budget_set_voltage;
@@ -417,7 +417,7 @@ static void frontend_init(struct budget *budget)
417 break; 417 break;
418 418
419 case 0x1016: // Hauppauge/TT Nova-S SE (samsung s5h1420/????(tda8260)) 419 case 0x1016: // Hauppauge/TT Nova-S SE (samsung s5h1420/????(tda8260))
420 budget->dvb_frontend = s5h1420_attach(&s5h1420_config, &budget->i2c_adap); 420 budget->dvb_frontend = dvb_attach(s5h1420_attach, &s5h1420_config, &budget->i2c_adap);
421 if (budget->dvb_frontend) { 421 if (budget->dvb_frontend) {
422 budget->dvb_frontend->ops.tuner_ops.set_params = s5h1420_tuner_set_params; 422 budget->dvb_frontend->ops.tuner_ops.set_params = s5h1420_tuner_set_params;
423 if (lnbp21_attach(budget->dvb_frontend, &budget->i2c_adap, 0, 0) == NULL) { 423 if (lnbp21_attach(budget->dvb_frontend, &budget->i2c_adap, 0, 0) == NULL) {
@@ -442,8 +442,9 @@ static void frontend_init(struct budget *budget)
442 442
443error_out: 443error_out:
444 printk("budget: Frontend registration failed!\n"); 444 printk("budget: Frontend registration failed!\n");
445 if (budget->dvb_frontend->ops.release) 445 dvb_detach(budget->dvb_frontend->ops.release_sec, budget->dvb_frontend);
446 budget->dvb_frontend->ops.release(budget->dvb_frontend); 446 dvb_detach(budget->dvb_frontend->ops.tuner_ops.release, budget->dvb_frontend);
447 dvb_detach(budget->dvb_frontend->ops.release, budget->dvb_frontend);
447 budget->dvb_frontend = NULL; 448 budget->dvb_frontend = NULL;
448 return; 449 return;
449} 450}
@@ -481,7 +482,12 @@ static int budget_detach (struct saa7146_dev* dev)
481 struct budget *budget = (struct budget*) dev->ext_priv; 482 struct budget *budget = (struct budget*) dev->ext_priv;
482 int err; 483 int err;
483 484
484 if (budget->dvb_frontend) dvb_unregister_frontend(budget->dvb_frontend); 485 if (budget->dvb_frontend) {
486 dvb_unregister_frontend(budget->dvb_frontend);
487 dvb_detach(budget->dvb_frontend->ops.release_sec, budget->dvb_frontend);
488 dvb_detach(budget->dvb_frontend->ops.tuner_ops.release, budget->dvb_frontend);
489 dvb_detach(budget->dvb_frontend->ops.release, budget->dvb_frontend);
490 }
485 491
486 err = ttpci_budget_deinit (budget); 492 err = ttpci_budget_deinit (budget);
487 493