diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-04-24 12:25:00 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-04-24 12:25:00 +0200 |
commit | e9f66d9b9ce03f74a52894cebedf12b67f65dd24 (patch) | |
tree | 6fc07ea37548ac3c9f808ee25c10fcfeb34236ea /sound/pci/emu10k1 | |
parent | 68853fa30cdb6a9a92f7ab46c34aedb24b2f9d56 (diff) |
ALSA: pci: clean up using module_pci_driver()
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/emu10k1')
-rw-r--r-- | sound/pci/emu10k1/emu10k1.c | 15 | ||||
-rw-r--r-- | sound/pci/emu10k1/emu10k1x.c | 17 |
2 files changed, 4 insertions, 28 deletions
diff --git a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c index 790c65d980c8..7fdbbe4d9965 100644 --- a/sound/pci/emu10k1/emu10k1.c +++ b/sound/pci/emu10k1/emu10k1.c @@ -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); diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c index 47a651cb6e84..5c8978b2c4d9 100644 --- a/sound/pci/emu10k1/emu10k1x.c +++ b/sound/pci/emu10k1/emu10k1x.c @@ -1612,24 +1612,11 @@ static DEFINE_PCI_DEVICE_TABLE(snd_emu10k1x_ids) = { MODULE_DEVICE_TABLE(pci, snd_emu10k1x_ids); // pci_driver definition -static struct pci_driver driver = { +static struct pci_driver emu10k1x_driver = { .name = KBUILD_MODNAME, .id_table = snd_emu10k1x_ids, .probe = snd_emu10k1x_probe, .remove = __devexit_p(snd_emu10k1x_remove), }; -// initialization of the module -static int __init alsa_card_emu10k1x_init(void) -{ - return pci_register_driver(&driver); -} - -// clean up the module -static void __exit alsa_card_emu10k1x_exit(void) -{ - pci_unregister_driver(&driver); -} - -module_init(alsa_card_emu10k1x_init) -module_exit(alsa_card_emu10k1x_exit) +module_pci_driver(emu10k1x_driver); |