diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-04-24 06:25:00 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-04-24 06:25:00 -0400 |
commit | e9f66d9b9ce03f74a52894cebedf12b67f65dd24 (patch) | |
tree | 6fc07ea37548ac3c9f808ee25c10fcfeb34236ea /sound/pci/aw2/aw2-alsa.c | |
parent | 68853fa30cdb6a9a92f7ab46c34aedb24b2f9d56 (diff) |
ALSA: pci: clean up using module_pci_driver()
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/aw2/aw2-alsa.c')
-rw-r--r-- | sound/pci/aw2/aw2-alsa.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/sound/pci/aw2/aw2-alsa.c b/sound/pci/aw2/aw2-alsa.c index 1c5231931462..0f804741825f 100644 --- a/sound/pci/aw2/aw2-alsa.c +++ b/sound/pci/aw2/aw2-alsa.c | |||
@@ -112,8 +112,6 @@ struct aw2 { | |||
112 | /********************************* | 112 | /********************************* |
113 | * FUNCTION DECLARATIONS | 113 | * FUNCTION DECLARATIONS |
114 | ********************************/ | 114 | ********************************/ |
115 | static int __init alsa_card_aw2_init(void); | ||
116 | static void __exit alsa_card_aw2_exit(void); | ||
117 | static int snd_aw2_dev_free(struct snd_device *device); | 115 | static int snd_aw2_dev_free(struct snd_device *device); |
118 | static int __devinit snd_aw2_create(struct snd_card *card, | 116 | static int __devinit snd_aw2_create(struct snd_card *card, |
119 | struct pci_dev *pci, struct aw2 **rchip); | 117 | struct pci_dev *pci, struct aw2 **rchip); |
@@ -171,13 +169,15 @@ static DEFINE_PCI_DEVICE_TABLE(snd_aw2_ids) = { | |||
171 | MODULE_DEVICE_TABLE(pci, snd_aw2_ids); | 169 | MODULE_DEVICE_TABLE(pci, snd_aw2_ids); |
172 | 170 | ||
173 | /* pci_driver definition */ | 171 | /* pci_driver definition */ |
174 | static struct pci_driver driver = { | 172 | static struct pci_driver aw2_driver = { |
175 | .name = KBUILD_MODNAME, | 173 | .name = KBUILD_MODNAME, |
176 | .id_table = snd_aw2_ids, | 174 | .id_table = snd_aw2_ids, |
177 | .probe = snd_aw2_probe, | 175 | .probe = snd_aw2_probe, |
178 | .remove = __devexit_p(snd_aw2_remove), | 176 | .remove = __devexit_p(snd_aw2_remove), |
179 | }; | 177 | }; |
180 | 178 | ||
179 | module_pci_driver(aw2_driver); | ||
180 | |||
181 | /* operators for playback PCM alsa interface */ | 181 | /* operators for playback PCM alsa interface */ |
182 | static struct snd_pcm_ops snd_aw2_playback_ops = { | 182 | static struct snd_pcm_ops snd_aw2_playback_ops = { |
183 | .open = snd_aw2_pcm_playback_open, | 183 | .open = snd_aw2_pcm_playback_open, |
@@ -217,23 +217,6 @@ static struct snd_kcontrol_new aw2_control __devinitdata = { | |||
217 | * FUNCTION IMPLEMENTATIONS | 217 | * FUNCTION IMPLEMENTATIONS |
218 | ********************************/ | 218 | ********************************/ |
219 | 219 | ||
220 | /* initialization of the module */ | ||
221 | static int __init alsa_card_aw2_init(void) | ||
222 | { | ||
223 | snd_printdd(KERN_DEBUG "aw2: Load aw2 module\n"); | ||
224 | return pci_register_driver(&driver); | ||
225 | } | ||
226 | |||
227 | /* clean up the module */ | ||
228 | static void __exit alsa_card_aw2_exit(void) | ||
229 | { | ||
230 | snd_printdd(KERN_DEBUG "aw2: Unload aw2 module\n"); | ||
231 | pci_unregister_driver(&driver); | ||
232 | } | ||
233 | |||
234 | module_init(alsa_card_aw2_init); | ||
235 | module_exit(alsa_card_aw2_exit); | ||
236 | |||
237 | /* component-destructor */ | 220 | /* component-destructor */ |
238 | static int snd_aw2_dev_free(struct snd_device *device) | 221 | static int snd_aw2_dev_free(struct snd_device *device) |
239 | { | 222 | { |