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>
This commit is contained in:
Родитель
22c859faf5
Коммит
2abf6dd8e8
|
@ -576,8 +576,6 @@ static struct pci_driver bt878_pci_driver = {
|
||||||
.remove = __devexit_p(bt878_remove),
|
.remove = __devexit_p(bt878_remove),
|
||||||
};
|
};
|
||||||
|
|
||||||
static int bt878_pci_driver_registered;
|
|
||||||
|
|
||||||
/*******************************/
|
/*******************************/
|
||||||
/* Module management functions */
|
/* Module management functions */
|
||||||
/*******************************/
|
/*******************************/
|
||||||
|
@ -585,34 +583,23 @@ static int bt878_pci_driver_registered;
|
||||||
static int __init bt878_init_module(void)
|
static int __init bt878_init_module(void)
|
||||||
{
|
{
|
||||||
bt878_num = 0;
|
bt878_num = 0;
|
||||||
bt878_pci_driver_registered = 0;
|
|
||||||
|
|
||||||
printk(KERN_INFO "bt878: AUDIO driver version %d.%d.%d loaded\n",
|
printk(KERN_INFO "bt878: AUDIO driver version %d.%d.%d loaded\n",
|
||||||
(BT878_VERSION_CODE >> 16) & 0xff,
|
(BT878_VERSION_CODE >> 16) & 0xff,
|
||||||
(BT878_VERSION_CODE >> 8) & 0xff,
|
(BT878_VERSION_CODE >> 8) & 0xff,
|
||||||
BT878_VERSION_CODE & 0xff);
|
BT878_VERSION_CODE & 0xff);
|
||||||
/*
|
|
||||||
bt878_check_chipset();
|
|
||||||
*/
|
|
||||||
/* later we register inside of bt878_find_audio_dma()
|
|
||||||
* because we may want to ignore certain cards */
|
|
||||||
bt878_pci_driver_registered = 1;
|
|
||||||
return pci_register_driver(&bt878_pci_driver);
|
return pci_register_driver(&bt878_pci_driver);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit bt878_cleanup_module(void)
|
static void __exit bt878_cleanup_module(void)
|
||||||
{
|
{
|
||||||
if (bt878_pci_driver_registered) {
|
|
||||||
bt878_pci_driver_registered = 0;
|
|
||||||
pci_unregister_driver(&bt878_pci_driver);
|
pci_unregister_driver(&bt878_pci_driver);
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(bt878_init_module);
|
module_init(bt878_init_module);
|
||||||
module_exit(bt878_cleanup_module);
|
module_exit(bt878_cleanup_module);
|
||||||
|
|
||||||
//MODULE_AUTHOR("XXX");
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Загрузка…
Ссылка в новой задаче