Commit e9f66d9b authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: pci: clean up using module_pci_driver()



Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 68853fa3
......@@ -1062,17 +1062,4 @@ static struct pci_driver ad1889_pci_driver = {
.remove = __devexit_p(snd_ad1889_remove),
};
static int __init
alsa_ad1889_init(void)
{
return pci_register_driver(&ad1889_pci_driver);
}
static void __exit
alsa_ad1889_fini(void)
{
pci_unregister_driver(&ad1889_pci_driver);
}
module_init(alsa_ad1889_init);
module_exit(alsa_ad1889_fini);
module_pci_driver(ad1889_pci_driver);
......@@ -2294,7 +2294,7 @@ static void __devexit snd_ali_remove(struct pci_dev *pci)
pci_set_drvdata(pci, NULL);
}
static struct pci_driver driver = {
static struct pci_driver ali5451_driver = {
.name = KBUILD_MODNAME,
.id_table = snd_ali_ids,
.probe = snd_ali_probe,
......@@ -2305,15 +2305,4 @@ static struct pci_driver driver = {
#endif
};
static int __init alsa_card_ali_init(void)
{
return pci_register_driver(&driver);
}
static void __exit alsa_card_ali_exit(void)
{
pci_unregister_driver(&driver);
}
module_init(alsa_card_ali_init)
module_exit(alsa_card_ali_exit)
module_pci_driver(ali5451_driver);
......@@ -852,7 +852,7 @@ static int __devinit snd_als300_probe(struct pci_dev *pci,
return 0;
}
static struct pci_driver driver = {
static struct pci_driver als300_driver = {
.name = KBUILD_MODNAME,
.id_table = snd_als300_ids,
.probe = snd_als300_probe,
......@@ -863,15 +863,4 @@ static struct pci_driver driver = {
#endif
};
static int __init alsa_card_als300_init(void)
{
return pci_register_driver(&driver);
}
static void __exit alsa_card_als300_exit(void)
{
pci_unregister_driver(&driver);
}
module_init(alsa_card_als300_init)
module_exit(alsa_card_als300_exit)
module_pci_driver(als300_driver);
......@@ -1036,7 +1036,7 @@ static int snd_als4000_resume(struct pci_dev *pci)
#endif /* CONFIG_PM */
static struct pci_driver driver = {
static struct pci_driver als4000_driver = {
.name = KBUILD_MODNAME,
.id_table = snd_als4000_ids,
.probe = snd_card_als4000_probe,
......@@ -1047,15 +1047,4 @@ static struct pci_driver driver = {
#endif
};
static int __init alsa_card_als4000_init(void)
{
return pci_register_driver(&driver);
}
static void __exit alsa_card_als4000_exit(void)
{
pci_unregister_driver(&driver);
}
module_init(alsa_card_als4000_init)
module_exit(alsa_card_als4000_exit)
module_pci_driver(als4000_driver);
......@@ -2963,7 +2963,7 @@ static DEFINE_PCI_DEVICE_TABLE(asihpi_pci_tbl) = {
};
MODULE_DEVICE_TABLE(pci, asihpi_pci_tbl);
static struct pci_driver driver = {
static struct pci_driver asihpi_driver = {
.name = KBUILD_MODNAME,
.id_table = asihpi_pci_tbl,
.probe = snd_asihpi_probe,
......@@ -2974,19 +2974,4 @@ static struct pci_driver driver = {
#endif
};
static int __init snd_asihpi_init(void)
{
asihpi_init();
return pci_register_driver(&driver);
}
static void __exit snd_asihpi_exit(void)
{
pci_unregister_driver(&driver);
asihpi_exit();
}
module_init(snd_asihpi_init)
module_exit(snd_asihpi_exit)
module_pci_driver(asihpi_driver);
......@@ -1700,7 +1700,7 @@ static void __devexit snd_atiixp_remove(struct pci_dev *pci)
pci_set_drvdata(pci, NULL);
}
static struct pci_driver driver = {
static struct pci_driver atiixp_driver = {
.name = KBUILD_MODNAME,
.id_table = snd_atiixp_ids,
.probe = snd_atiixp_probe,
......@@ -1711,16 +1711,4 @@ static struct pci_driver driver = {
#endif
};
static int __init alsa_card_atiixp_init(void)
{
return pci_register_driver(&driver);
}
static void __exit alsa_card_atiixp_exit(void)
{
pci_unregister_driver(&driver);
}
module_init(alsa_card_atiixp_init)
module_exit(alsa_card_atiixp_exit)
module_pci_driver(atiixp_driver);
......@@ -1331,7 +1331,7 @@ static void __devexit snd_atiixp_remove(struct pci_dev *pci)
pci_set_drvdata(pci, NULL);
}
static struct pci_driver driver = {
static struct pci_driver atiixp_modem_driver = {
.name = KBUILD_MODNAME,
.id_table = snd_atiixp_ids,
.probe = snd_atiixp_probe,
......@@ -1342,16 +1342,4 @@ static struct pci_driver driver = {
#endif
};
static int __init alsa_card_atiixp_init(void)
{
return pci_register_driver(&driver);
}
static void __exit alsa_card_atiixp_exit(void)
{
pci_unregister_driver(&driver);
}
module_init(alsa_card_atiixp_init)
module_exit(alsa_card_atiixp_exit)
module_pci_driver(atiixp_modem_driver);
......@@ -375,24 +375,11 @@ static void __devexit snd_vortex_remove(struct pci_dev *pci)
}
// pci_driver definition
static struct pci_driver driver = {
static struct pci_driver vortex_driver = {
.name = KBUILD_MODNAME,
.id_table = snd_vortex_ids,
.probe = snd_vortex_probe,
.remove = __devexit_p(snd_vortex_remove),
};
// initialization of the module
static int __init alsa_card_vortex_init(void)
{
return pci_register_driver(&driver);
}
// clean up the module
static void __exit alsa_card_vortex_exit(void)
{
pci_unregister_driver(&driver);
}
module_init(alsa_card_vortex_init)
module_exit(alsa_card_vortex_exit)
module_pci_driver(vortex_driver);
......@@ -112,8 +112,6 @@ struct aw2 {
/*********************************
* FUNCTION DECLARATIONS
********************************/
static int __init alsa_card_aw2_init(void);
static void __exit alsa_card_aw2_exit(void);
static int snd_aw2_dev_free(struct snd_device *device);
static int __devinit snd_aw2_create(struct snd_card *card,
struct pci_dev *pci, struct aw2 **rchip);
......@@ -171,13 +169,15 @@ static DEFINE_PCI_DEVICE_TABLE(snd_aw2_ids) = {
MODULE_DEVICE_TABLE(pci, snd_aw2_ids);
/* pci_driver definition */
static struct pci_driver driver = {
static struct pci_driver aw2_driver = {
.name = KBUILD_MODNAME,
.id_table = snd_aw2_ids,
.probe = snd_aw2_probe,
.remove = __devexit_p(snd_aw2_remove),
};
module_pci_driver(aw2_driver);
/* operators for playback PCM alsa interface */
static struct snd_pcm_ops snd_aw2_playback_ops = {
.open = snd_aw2_pcm_playback_open,
......@@ -217,23 +217,6 @@ static struct snd_kcontrol_new aw2_control __devinitdata = {
* FUNCTION IMPLEMENTATIONS
********************************/
/* initialization of the module */
static int __init alsa_card_aw2_init(void)
{
snd_printdd(KERN_DEBUG "aw2: Load aw2 module\n");
return pci_register_driver(&driver);
}
/* clean up the module */
static void __exit alsa_card_aw2_exit(void)
{
snd_printdd(KERN_DEBUG "aw2: Unload aw2 module\n");
pci_unregister_driver(&driver);
}
module_init(alsa_card_aw2_init);
module_exit(alsa_card_aw2_exit);
/* component-destructor */
static int snd_aw2_dev_free(struct snd_device *device)
{
......
......@@ -2862,7 +2862,7 @@ snd_azf3328_resume(struct pci_dev *pci)
#endif /* CONFIG_PM */
static struct pci_driver driver = {
static struct pci_driver azf3328_driver = {
.name = KBUILD_MODNAME,
.id_table = snd_azf3328_ids,
.probe = snd_azf3328_probe,
......@@ -2873,23 +2873,4 @@ static struct pci_driver driver = {
#endif
};
static int __init
alsa_card_azf3328_init(void)
{
int err;
snd_azf3328_dbgcallenter();
err = pci_register_driver(&driver);
snd_azf3328_dbgcallleave();
return err;
}
static void __exit
alsa_card_azf3328_exit(void)
{
snd_azf3328_dbgcallenter();
pci_unregister_driver(&driver);
snd_azf3328_dbgcallleave();
}
module_init(alsa_card_azf3328_init)
module_exit(alsa_card_azf3328_exit)
module_pci_driver(azf3328_driver);
......@@ -836,8 +836,6 @@ static struct {
{0x7063, 0x2000}, /* pcHDTV HD-2000 TV */
};
static struct pci_driver driver;
/* return the id of the card, or a negative value if it's blacklisted */
static int __devinit snd_bt87x_detect_card(struct pci_dev *pci)
{
......@@ -964,24 +962,11 @@ static DEFINE_PCI_DEVICE_TABLE(snd_bt87x_default_ids) = {
{ }
};
static struct pci_driver driver = {
static struct pci_driver bt87x_driver = {
.name = KBUILD_MODNAME,
.id_table = snd_bt87x_ids,
.probe = snd_bt87x_probe,
.remove = __devexit_p(snd_bt87x_remove),
};
static int __init alsa_card_bt87x_init(void)
{
if (load_all)
driver.id_table = snd_bt87x_default_ids;
return pci_register_driver(&driver);
}
static void __exit alsa_card_bt87x_exit(void)
{
pci_unregister_driver(&driver);
}
module_init(alsa_card_bt87x_init)
module_exit(alsa_card_bt87x_exit)
module_pci_driver(bt87x_driver);
......@@ -1932,7 +1932,7 @@ static DEFINE_PCI_DEVICE_TABLE(snd_ca0106_ids) = {
MODULE_DEVICE_TABLE(pci, snd_ca0106_ids);
// pci_driver definition
static struct pci_driver driver = {
static struct pci_driver ca0106_driver = {
.name = KBUILD_MODNAME,
.id_table = snd_ca0106_ids,
.probe = snd_ca0106_probe,
......@@ -1943,17 +1943,4 @@ static struct pci_driver driver = {
#endif
};
// initialization of the module
static int __init alsa_card_ca0106_init(void)
{
return pci_register_driver(&driver);
}
// clean up the module
static void __exit alsa_card_ca0106_exit(void)
{
pci_unregister_driver(&driver);
}
module_init(alsa_card_ca0106_init)
module_exit(alsa_card_ca0106_exit)
module_pci_driver(ca0106_driver);
......@@ -3398,7 +3398,7 @@ static int snd_cmipci_resume(struct pci_dev *pci)
}
#endif /* CONFIG_PM */
static struct pci_driver driver = {
static struct pci_driver cmipci_driver = {
.name = KBUILD_MODNAME,
.id_table = snd_cmipci_ids,
.probe = snd_cmipci_probe,
......@@ -3409,15 +3409,4 @@ static struct pci_driver driver = {
#endif
};
static int __init alsa_card_cmipci_init(void)
{
return pci_register_driver(&driver);
}
static void __exit alsa_card_cmipci_exit(void)
{
pci_unregister_driver(&driver);
}
module_init(alsa_card_cmipci_init)
module_exit(alsa_card_cmipci_exit)
module_pci_driver(cmipci_driver);
......@@ -2084,7 +2084,7 @@ static int cs4281_resume(struct pci_dev *pci)
}
#endif /* CONFIG_PM */
static struct pci_driver driver = {
static struct pci_driver cs4281_driver = {
.name = KBUILD_MODNAME,
.id_table = snd_cs4281_ids,
.probe = snd_cs4281_probe,
......@@ -2095,15 +2095,4 @@ static struct pci_driver driver = {
#endif
};
static int __init alsa_card_cs4281_init(void)
{
return pci_register_driver(&driver);
}
static void __exit alsa_card_cs4281_exit(void)
{
pci_unregister_driver(&driver);
}
module_init(alsa_card_cs4281_init)
module_exit(alsa_card_cs4281_exit)
module_pci_driver(cs4281_driver);
......@@ -161,7 +161,7 @@ static void __devexit snd_card_cs46xx_remove(struct pci_dev *pci)
pci_set_drvdata(pci, NULL);
}
static struct pci_driver driver = {
static struct pci_driver cs46xx_driver = {
.name = KBUILD_MODNAME,
.id_table = snd_cs46xx_ids,
.probe = snd_card_cs46xx_probe,
......@@ -172,15 +172,4 @@ static struct pci_driver driver = {
#endif
};
static int __init alsa_card_cs46xx_init(void)
{
return pci_register_driver(&driver);
}
static void __exit alsa_card_cs46xx_exit(void)
{
pci_unregister_driver(&driver);
}
module_init(alsa_card_cs46xx_init)
module_exit(alsa_card_cs46xx_exit)
module_pci_driver(cs46xx_driver);
......@@ -291,23 +291,11 @@ static int __devinit snd_cs5530_probe(struct pci_dev *pci,
return 0;
}
static struct pci_driver driver = {
static struct pci_driver cs5530_driver = {
.name = KBUILD_MODNAME,
.id_table = snd_cs5530_ids,
.probe = snd_cs5530_probe,
.remove = __devexit_p(snd_cs5530_remove),
};
static int __init alsa_card_cs5530_init(void)
{
return pci_register_driver(&driver);
}
static void __exit alsa_card_cs5530_exit(void)
{
pci_unregister_driver(&driver);
}
module_init(alsa_card_cs5530_init)
module_exit(alsa_card_cs5530_exit)
module_pci_driver(cs5530_driver);
......@@ -394,7 +394,7 @@ static void __devexit snd_cs5535audio_remove(struct pci_dev *pci)
pci_set_drvdata(pci, NULL);
}
static struct pci_driver driver = {
static struct pci_driver cs5535audio_driver = {
.name = KBUILD_MODNAME,
.id_table = snd_cs5535audio_ids,
.probe = snd_cs5535audio_probe,
......@@ -405,18 +405,7 @@ static struct pci_driver driver = {
#endif
};
static int __init alsa_card_cs5535audio_init(void)
{
return pci_register_driver(&driver);
}
static void __exit alsa_card_cs5535audio_exit(void)
{
pci_unregister_driver(&driver);
}
module_init(alsa_card_cs5535audio_init)
module_exit(alsa_card_cs5535audio_exit)
module_pci_driver(cs5535audio_driver);
MODULE_AUTHOR("Jaya Kumar");
MODULE_LICENSE("GPL");
......
......@@ -154,15 +154,4 @@ static struct pci_driver ct_driver = {
#endif
};
static int __init ct_card_init(void)
{
return pci_register_driver(&ct_driver);
}
static void __exit ct_card_exit(void)
{
pci_unregister_driver(&ct_driver);
}
module_init(ct_card_init)
module_exit(ct_card_exit)
module_pci_driver(ct_driver);
......@@ -2328,7 +2328,7 @@ static void __devexit snd_echo_remove(struct pci_dev *pci)
******************************************************************************/
/* pci_driver definition */
static struct pci_driver driver = {
static struct pci_driver echo_driver = {
.name = KBUILD_MODNAME,
.id_table = snd_echo_ids,
.probe = snd_echo_probe,
......@@ -2339,22 +2339,4 @@ static struct pci_driver driver = {
#endif /* CONFIG_PM */
};
/* initialization of the module */
static int __init alsa_card_echo_init(void)
{
return pci_register_driver(&driver);
}
/* clean up the module */
static void __exit alsa_card_echo_exit(void)
{
pci_unregister_driver(&driver);
}
module_init(alsa_card_echo_init)
module_exit(alsa_card_echo_exit)
module_pci_driver(echo_driver);
......@@ -263,7 +263,7 @@ static int snd_emu10k1_resume(struct pci_dev *pci)
}
#endif
static struct pci_driver driver = {
static struct pci_driver emu10k1_driver = {
.name = KBUILD_MODNAME,
.id_table = snd_emu10k1_ids,
.probe = snd_card_emu10k1_probe,
......@@ -274,15 +274,4 @@ static struct pci_driver driver = {
#endif
};
static int __init alsa_card_emu10k1_init(void)
{
return pci_register_driver(&driver);
}
static void __exit alsa_card_emu10k1_exit(void)
{
pci_unregister_driver(&driver);
}
module_init(alsa_card_emu10k1_init)
module_exit(alsa_card_emu10k1_exit)
module_pci_driver(emu10k1_driver);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment