diff options
Diffstat (limited to 'drivers/media/dvb/ttpci/budget-patch.c')
-rw-r--r-- | drivers/media/dvb/ttpci/budget-patch.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/media/dvb/ttpci/budget-patch.c b/drivers/media/dvb/ttpci/budget-patch.c index 57227441891e..82dbef863e51 100644 --- a/drivers/media/dvb/ttpci/budget-patch.c +++ b/drivers/media/dvb/ttpci/budget-patch.c | |||
@@ -325,7 +325,7 @@ static void frontend_init(struct budget_patch* budget) | |||
325 | case 0x1013: // SATELCO Multimedia PCI | 325 | case 0x1013: // SATELCO Multimedia PCI |
326 | 326 | ||
327 | // try the ALPS BSRV2 first of all | 327 | // try the ALPS BSRV2 first of all |
328 | budget->dvb_frontend = ves1x93_attach(&alps_bsrv2_config, &budget->i2c_adap); | 328 | budget->dvb_frontend = dvb_attach(ves1x93_attach, &alps_bsrv2_config, &budget->i2c_adap); |
329 | if (budget->dvb_frontend) { | 329 | if (budget->dvb_frontend) { |
330 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; | 330 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; |
331 | budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_patch_diseqc_send_master_cmd; | 331 | budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_patch_diseqc_send_master_cmd; |
@@ -335,7 +335,7 @@ static void frontend_init(struct budget_patch* budget) | |||
335 | } | 335 | } |
336 | 336 | ||
337 | // try the ALPS BSRU6 now | 337 | // try the ALPS BSRU6 now |
338 | budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap); | 338 | budget->dvb_frontend = dvb_attach(stv0299_attach, &alps_bsru6_config, &budget->i2c_adap); |
339 | if (budget->dvb_frontend) { | 339 | if (budget->dvb_frontend) { |
340 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; | 340 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; |
341 | budget->dvb_frontend->tuner_priv = &budget->i2c_adap; | 341 | budget->dvb_frontend->tuner_priv = &budget->i2c_adap; |
@@ -347,7 +347,7 @@ static void frontend_init(struct budget_patch* budget) | |||
347 | } | 347 | } |
348 | 348 | ||
349 | // Try the grundig 29504-451 | 349 | // Try the grundig 29504-451 |
350 | budget->dvb_frontend = tda8083_attach(&grundig_29504_451_config, &budget->i2c_adap); | 350 | budget->dvb_frontend = dvb_attach(tda8083_attach, &grundig_29504_451_config, &budget->i2c_adap); |
351 | if (budget->dvb_frontend) { | 351 | if (budget->dvb_frontend) { |
352 | budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; | 352 | budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; |
353 | budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd; | 353 | budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd; |
@@ -367,8 +367,9 @@ static void frontend_init(struct budget_patch* budget) | |||
367 | } else { | 367 | } else { |
368 | if (dvb_register_frontend(&budget->dvb_adapter, budget->dvb_frontend)) { | 368 | if (dvb_register_frontend(&budget->dvb_adapter, budget->dvb_frontend)) { |
369 | printk("budget-av: Frontend registration failed!\n"); | 369 | printk("budget-av: Frontend registration failed!\n"); |
370 | if (budget->dvb_frontend->ops.release) | 370 | dvb_detach(budget->dvb_frontend->ops.release_sec, budget->dvb_frontend); |
371 | budget->dvb_frontend->ops.release(budget->dvb_frontend); | 371 | dvb_detach(budget->dvb_frontend->ops.tuner_ops.release, budget->dvb_frontend); |
372 | dvb_detach(budget->dvb_frontend->ops.release, budget->dvb_frontend); | ||
372 | budget->dvb_frontend = NULL; | 373 | budget->dvb_frontend = NULL; |
373 | } | 374 | } |
374 | } | 375 | } |
@@ -627,8 +628,12 @@ static int budget_patch_detach (struct saa7146_dev* dev) | |||
627 | struct budget_patch *budget = (struct budget_patch*) dev->ext_priv; | 628 | struct budget_patch *budget = (struct budget_patch*) dev->ext_priv; |
628 | int err; | 629 | int err; |
629 | 630 | ||
630 | if (budget->dvb_frontend) dvb_unregister_frontend(budget->dvb_frontend); | 631 | if (budget->dvb_frontend) { |
631 | 632 | dvb_unregister_frontend(budget->dvb_frontend); | |
633 | dvb_detach(budget->dvb_frontend->ops.release_sec, budget->dvb_frontend); | ||
634 | dvb_detach(budget->dvb_frontend->ops.tuner_ops.release, budget->dvb_frontend); | ||
635 | dvb_detach(budget->dvb_frontend->ops.release, budget->dvb_frontend); | ||
636 | } | ||
632 | err = ttpci_budget_deinit (budget); | 637 | err = ttpci_budget_deinit (budget); |
633 | 638 | ||
634 | kfree (budget); | 639 | kfree (budget); |