diff options
author | Jean Delvare <khali@linux-fr.org> | 2010-01-26 14:46:58 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 13:10:49 -0500 |
commit | 2abf6dd8e8754db6b18a4d55d3e4425c0a22d280 (patch) | |
tree | 9a9ac197a8881e03c3e07da450a81bf1dbd5ec86 /drivers/media/dvb/bt8xx/bt878.c | |
parent | 22c859faf5e10e7f7b04a2c643a98eeee69c1815 (diff) |
V4L/DVB: dvb/bt8xx: Clean-up init and exit functions
The init and exit functions are needlessly complex. Remove the bloat:
* Drop irrelevant/outdated comments.
* Remove useless bt878_pci_driver_registered global variable.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/bt8xx/bt878.c')
-rw-r--r-- | drivers/media/dvb/bt8xx/bt878.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/media/dvb/bt8xx/bt878.c b/drivers/media/dvb/bt8xx/bt878.c index 2a0886ad787f..99d62094f908 100644 --- a/drivers/media/dvb/bt8xx/bt878.c +++ b/drivers/media/dvb/bt8xx/bt878.c | |||
@@ -576,8 +576,6 @@ static struct pci_driver bt878_pci_driver = { | |||
576 | .remove = __devexit_p(bt878_remove), | 576 | .remove = __devexit_p(bt878_remove), |
577 | }; | 577 | }; |
578 | 578 | ||
579 | static int bt878_pci_driver_registered; | ||
580 | |||
581 | /*******************************/ | 579 | /*******************************/ |
582 | /* Module management functions */ | 580 | /* Module management functions */ |
583 | /*******************************/ | 581 | /*******************************/ |
@@ -585,34 +583,23 @@ static int bt878_pci_driver_registered; | |||
585 | static int __init bt878_init_module(void) | 583 | static int __init bt878_init_module(void) |
586 | { | 584 | { |
587 | bt878_num = 0; | 585 | bt878_num = 0; |
588 | bt878_pci_driver_registered = 0; | ||
589 | 586 | ||
590 | printk(KERN_INFO "bt878: AUDIO driver version %d.%d.%d loaded\n", | 587 | printk(KERN_INFO "bt878: AUDIO driver version %d.%d.%d loaded\n", |
591 | (BT878_VERSION_CODE >> 16) & 0xff, | 588 | (BT878_VERSION_CODE >> 16) & 0xff, |
592 | (BT878_VERSION_CODE >> 8) & 0xff, | 589 | (BT878_VERSION_CODE >> 8) & 0xff, |
593 | BT878_VERSION_CODE & 0xff); | 590 | BT878_VERSION_CODE & 0xff); |
594 | /* | 591 | |
595 | bt878_check_chipset(); | ||
596 | */ | ||
597 | /* later we register inside of bt878_find_audio_dma() | ||
598 | * because we may want to ignore certain cards */ | ||
599 | bt878_pci_driver_registered = 1; | ||
600 | return pci_register_driver(&bt878_pci_driver); | 592 | return pci_register_driver(&bt878_pci_driver); |
601 | } | 593 | } |
602 | 594 | ||
603 | static void __exit bt878_cleanup_module(void) | 595 | static void __exit bt878_cleanup_module(void) |
604 | { | 596 | { |
605 | if (bt878_pci_driver_registered) { | 597 | pci_unregister_driver(&bt878_pci_driver); |
606 | bt878_pci_driver_registered = 0; | ||
607 | pci_unregister_driver(&bt878_pci_driver); | ||
608 | } | ||
609 | return; | ||
610 | } | 598 | } |
611 | 599 | ||
612 | module_init(bt878_init_module); | 600 | module_init(bt878_init_module); |
613 | module_exit(bt878_cleanup_module); | 601 | module_exit(bt878_cleanup_module); |
614 | 602 | ||
615 | //MODULE_AUTHOR("XXX"); | ||
616 | MODULE_LICENSE("GPL"); | 603 | MODULE_LICENSE("GPL"); |
617 | 604 | ||
618 | /* | 605 | /* |