diff options
author | Andrew de Quincey <adq_dvb@lidskialf.net> | 2006-08-08 08:10:09 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-26 10:53:29 -0400 |
commit | f52a838b74be70b4054ab27e435e9acb92d8c50a (patch) | |
tree | 81b9b3dff85a069781244636c0a4cf29f0220d86 /drivers/media/dvb/ttpci | |
parent | 2a514dea5fda67958c79f5137d4dcb272f8561e8 (diff) |
V4L/DVB (4391): Refactor dvb_detach calls into a single dvb_frontend_detach function.
Remove buggy dvb_detach() macro and replace with unified
dvb_frontend_detach() call.
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Acked-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/ttpci')
-rw-r--r-- | drivers/media/dvb/ttpci/av7110.c | 8 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget-av.c | 8 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget-ci.c | 8 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget-patch.c | 8 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget.c | 8 |
5 files changed, 10 insertions, 30 deletions
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index d195cf591081..5742154d8841 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c | |||
@@ -1385,9 +1385,7 @@ static void dvb_unregister(struct av7110 *av7110) | |||
1385 | 1385 | ||
1386 | if (av7110->fe != NULL) { | 1386 | if (av7110->fe != NULL) { |
1387 | dvb_unregister_frontend(av7110->fe); | 1387 | dvb_unregister_frontend(av7110->fe); |
1388 | dvb_detach(av7110->fe->ops.release_sec, av7110->fe); | 1388 | dvb_frontend_detach(av7110->fe); |
1389 | dvb_detach(av7110->fe->ops.tuner_ops.release, av7110->fe); | ||
1390 | dvb_detach(av7110->fe->ops.release, av7110->fe); | ||
1391 | } | 1389 | } |
1392 | dvb_unregister_device(av7110->osd_dev); | 1390 | dvb_unregister_device(av7110->osd_dev); |
1393 | av7110_av_unregister(av7110); | 1391 | av7110_av_unregister(av7110); |
@@ -2259,9 +2257,7 @@ static int frontend_init(struct av7110 *av7110) | |||
2259 | ret = dvb_register_frontend(&av7110->dvb_adapter, av7110->fe); | 2257 | ret = dvb_register_frontend(&av7110->dvb_adapter, av7110->fe); |
2260 | if (ret < 0) { | 2258 | if (ret < 0) { |
2261 | printk("av7110: Frontend registration failed!\n"); | 2259 | printk("av7110: Frontend registration failed!\n"); |
2262 | dvb_detach(av7110->fe->ops.release_sec, av7110->fe); | 2260 | dvb_frontend_detach(av7110->fe); |
2263 | dvb_detach(av7110->fe->ops.tuner_ops.release, av7110->fe); | ||
2264 | dvb_detach(av7110->fe->ops.release, av7110->fe); | ||
2265 | av7110->fe = NULL; | 2261 | av7110->fe = NULL; |
2266 | } | 2262 | } |
2267 | } | 2263 | } |
diff --git a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c index c648c01c8ec5..6f1c41fb2cb4 100644 --- a/drivers/media/dvb/ttpci/budget-av.c +++ b/drivers/media/dvb/ttpci/budget-av.c | |||
@@ -1192,9 +1192,7 @@ static void frontend_init(struct budget_av *budget_av) | |||
1192 | if (dvb_register_frontend(&budget_av->budget.dvb_adapter, | 1192 | if (dvb_register_frontend(&budget_av->budget.dvb_adapter, |
1193 | budget_av->budget.dvb_frontend)) { | 1193 | budget_av->budget.dvb_frontend)) { |
1194 | printk(KERN_ERR "budget-av: Frontend registration failed!\n"); | 1194 | printk(KERN_ERR "budget-av: Frontend registration failed!\n"); |
1195 | dvb_detach(budget_av->budget.dvb_frontend->ops.release_sec, budget_av->budget.dvb_frontend); | 1195 | dvb_frontend_detach(budget_av->budget.dvb_frontend); |
1196 | dvb_detach(budget_av->budget.dvb_frontend->ops.tuner_ops.release, budget_av->budget.dvb_frontend); | ||
1197 | dvb_detach(budget_av->budget.dvb_frontend->ops.release, budget_av->budget.dvb_frontend); | ||
1198 | budget_av->budget.dvb_frontend = NULL; | 1196 | budget_av->budget.dvb_frontend = NULL; |
1199 | } | 1197 | } |
1200 | } | 1198 | } |
@@ -1230,9 +1228,7 @@ static int budget_av_detach(struct saa7146_dev *dev) | |||
1230 | 1228 | ||
1231 | if (budget_av->budget.dvb_frontend != NULL) { | 1229 | if (budget_av->budget.dvb_frontend != NULL) { |
1232 | dvb_unregister_frontend(budget_av->budget.dvb_frontend); | 1230 | dvb_unregister_frontend(budget_av->budget.dvb_frontend); |
1233 | dvb_detach(budget_av->budget.dvb_frontend->ops.release_sec, budget_av->budget.dvb_frontend); | 1231 | dvb_frontend_detach(budget_av->budget.dvb_frontend); |
1234 | dvb_detach(budget_av->budget.dvb_frontend->ops.tuner_ops.release, budget_av->budget.dvb_frontend); | ||
1235 | dvb_detach(budget_av->budget.dvb_frontend->ops.release, budget_av->budget.dvb_frontend); | ||
1236 | } | 1232 | } |
1237 | err = ttpci_budget_deinit(&budget_av->budget); | 1233 | err = ttpci_budget_deinit(&budget_av->budget); |
1238 | 1234 | ||
diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c index 20b5e8dc8739..e440fa100b94 100644 --- a/drivers/media/dvb/ttpci/budget-ci.c +++ b/drivers/media/dvb/ttpci/budget-ci.c | |||
@@ -1065,9 +1065,7 @@ static void frontend_init(struct budget_ci *budget_ci) | |||
1065 | if (dvb_register_frontend | 1065 | if (dvb_register_frontend |
1066 | (&budget_ci->budget.dvb_adapter, budget_ci->budget.dvb_frontend)) { | 1066 | (&budget_ci->budget.dvb_adapter, budget_ci->budget.dvb_frontend)) { |
1067 | printk("budget-ci: Frontend registration failed!\n"); | 1067 | printk("budget-ci: Frontend registration failed!\n"); |
1068 | dvb_detach(budget_ci->budget.dvb_frontend->ops.release_sec, budget_ci->budget.dvb_frontend); | 1068 | dvb_frontend_detach(budget_ci->budget.dvb_frontend); |
1069 | dvb_detach(budget_ci->budget.dvb_frontend->ops.tuner_ops.release, budget_ci->budget.dvb_frontend); | ||
1070 | dvb_detach(budget_ci->budget.dvb_frontend->ops.release, budget_ci->budget.dvb_frontend); | ||
1071 | budget_ci->budget.dvb_frontend = NULL; | 1069 | budget_ci->budget.dvb_frontend = NULL; |
1072 | } | 1070 | } |
1073 | } | 1071 | } |
@@ -1117,9 +1115,7 @@ static int budget_ci_detach(struct saa7146_dev *dev) | |||
1117 | ciintf_deinit(budget_ci); | 1115 | ciintf_deinit(budget_ci); |
1118 | if (budget_ci->budget.dvb_frontend) { | 1116 | if (budget_ci->budget.dvb_frontend) { |
1119 | dvb_unregister_frontend(budget_ci->budget.dvb_frontend); | 1117 | dvb_unregister_frontend(budget_ci->budget.dvb_frontend); |
1120 | dvb_detach(budget_ci->budget.dvb_frontend->ops.release_sec, budget_ci->budget.dvb_frontend); | 1118 | dvb_frontend_detach(budget_ci->budget.dvb_frontend); |
1121 | dvb_detach(budget_ci->budget.dvb_frontend->ops.tuner_ops.release, budget_ci->budget.dvb_frontend); | ||
1122 | dvb_detach(budget_ci->budget.dvb_frontend->ops.release, budget_ci->budget.dvb_frontend); | ||
1123 | } | 1119 | } |
1124 | err = ttpci_budget_deinit(&budget_ci->budget); | 1120 | err = ttpci_budget_deinit(&budget_ci->budget); |
1125 | 1121 | ||
diff --git a/drivers/media/dvb/ttpci/budget-patch.c b/drivers/media/dvb/ttpci/budget-patch.c index 82dbef863e51..d043e1f50d92 100644 --- a/drivers/media/dvb/ttpci/budget-patch.c +++ b/drivers/media/dvb/ttpci/budget-patch.c | |||
@@ -367,9 +367,7 @@ 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 | dvb_detach(budget->dvb_frontend->ops.release_sec, budget->dvb_frontend); | 370 | dvb_frontend_detach(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); | ||
373 | budget->dvb_frontend = NULL; | 371 | budget->dvb_frontend = NULL; |
374 | } | 372 | } |
375 | } | 373 | } |
@@ -630,9 +628,7 @@ static int budget_patch_detach (struct saa7146_dev* dev) | |||
630 | 628 | ||
631 | if (budget->dvb_frontend) { | 629 | if (budget->dvb_frontend) { |
632 | dvb_unregister_frontend(budget->dvb_frontend); | 630 | dvb_unregister_frontend(budget->dvb_frontend); |
633 | dvb_detach(budget->dvb_frontend->ops.release_sec, budget->dvb_frontend); | 631 | dvb_frontend_detach(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 | } |
637 | err = ttpci_budget_deinit (budget); | 633 | err = ttpci_budget_deinit (budget); |
638 | 634 | ||
diff --git a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c index 19beb11f9664..e846b9620170 100644 --- a/drivers/media/dvb/ttpci/budget.c +++ b/drivers/media/dvb/ttpci/budget.c | |||
@@ -442,9 +442,7 @@ static void frontend_init(struct budget *budget) | |||
442 | 442 | ||
443 | error_out: | 443 | error_out: |
444 | printk("budget: Frontend registration failed!\n"); | 444 | printk("budget: Frontend registration failed!\n"); |
445 | dvb_detach(budget->dvb_frontend->ops.release_sec, budget->dvb_frontend); | 445 | dvb_frontend_detach(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); | ||
448 | budget->dvb_frontend = NULL; | 446 | budget->dvb_frontend = NULL; |
449 | return; | 447 | return; |
450 | } | 448 | } |
@@ -484,9 +482,7 @@ static int budget_detach (struct saa7146_dev* dev) | |||
484 | 482 | ||
485 | if (budget->dvb_frontend) { | 483 | if (budget->dvb_frontend) { |
486 | dvb_unregister_frontend(budget->dvb_frontend); | 484 | dvb_unregister_frontend(budget->dvb_frontend); |
487 | dvb_detach(budget->dvb_frontend->ops.release_sec, budget->dvb_frontend); | 485 | dvb_frontend_detach(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 | } | 486 | } |
491 | 487 | ||
492 | err = ttpci_budget_deinit (budget); | 488 | err = ttpci_budget_deinit (budget); |