diff options
Diffstat (limited to 'sound/pci/mixart/mixart.c')
| -rw-r--r-- | sound/pci/mixart/mixart.c | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index 01f7f37a841..dbee59906ae 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
| 26 | #include <linux/pci.h> | 26 | #include <linux/pci.h> |
| 27 | #include <linux/dma-mapping.h> | 27 | #include <linux/dma-mapping.h> |
| 28 | #include <linux/module.h> | 28 | #include <linux/moduleparam.h> |
| 29 | #include <linux/mutex.h> | 29 | #include <linux/mutex.h> |
| 30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
| 31 | 31 | ||
| @@ -49,7 +49,7 @@ MODULE_SUPPORTED_DEVICE("{{Digigram," CARD_NAME "}}"); | |||
| 49 | 49 | ||
| 50 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ | 50 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ |
| 51 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ | 51 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ |
| 52 | static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ | 52 | static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ |
| 53 | 53 | ||
| 54 | module_param_array(index, int, NULL, 0444); | 54 | module_param_array(index, int, NULL, 0444); |
| 55 | MODULE_PARM_DESC(index, "Index value for Digigram " CARD_NAME " soundcard."); | 55 | MODULE_PARM_DESC(index, "Index value for Digigram " CARD_NAME " soundcard."); |
| @@ -1004,7 +1004,7 @@ static int snd_mixart_chip_dev_free(struct snd_device *device) | |||
| 1004 | 1004 | ||
| 1005 | /* | 1005 | /* |
| 1006 | */ | 1006 | */ |
| 1007 | static int snd_mixart_create(struct mixart_mgr *mgr, struct snd_card *card, int idx) | 1007 | static int __devinit snd_mixart_create(struct mixart_mgr *mgr, struct snd_card *card, int idx) |
| 1008 | { | 1008 | { |
| 1009 | int err; | 1009 | int err; |
| 1010 | struct snd_mixart *chip; | 1010 | struct snd_mixart *chip; |
| @@ -1180,7 +1180,7 @@ static void snd_mixart_proc_read(struct snd_info_entry *entry, | |||
| 1180 | } /* endif elf loaded */ | 1180 | } /* endif elf loaded */ |
| 1181 | } | 1181 | } |
| 1182 | 1182 | ||
| 1183 | static void snd_mixart_proc_init(struct snd_mixart *chip) | 1183 | static void __devinit snd_mixart_proc_init(struct snd_mixart *chip) |
| 1184 | { | 1184 | { |
| 1185 | struct snd_info_entry *entry; | 1185 | struct snd_info_entry *entry; |
| 1186 | 1186 | ||
| @@ -1209,8 +1209,8 @@ static void snd_mixart_proc_init(struct snd_mixart *chip) | |||
| 1209 | /* | 1209 | /* |
| 1210 | * probe function - creates the card manager | 1210 | * probe function - creates the card manager |
| 1211 | */ | 1211 | */ |
| 1212 | static int snd_mixart_probe(struct pci_dev *pci, | 1212 | static int __devinit snd_mixart_probe(struct pci_dev *pci, |
| 1213 | const struct pci_device_id *pci_id) | 1213 | const struct pci_device_id *pci_id) |
| 1214 | { | 1214 | { |
| 1215 | static int dev; | 1215 | static int dev; |
| 1216 | struct mixart_mgr *mgr; | 1216 | struct mixart_mgr *mgr; |
| @@ -1374,17 +1374,28 @@ static int snd_mixart_probe(struct pci_dev *pci, | |||
| 1374 | return 0; | 1374 | return 0; |
| 1375 | } | 1375 | } |
| 1376 | 1376 | ||
| 1377 | static void snd_mixart_remove(struct pci_dev *pci) | 1377 | static void __devexit snd_mixart_remove(struct pci_dev *pci) |
| 1378 | { | 1378 | { |
| 1379 | snd_mixart_free(pci_get_drvdata(pci)); | 1379 | snd_mixart_free(pci_get_drvdata(pci)); |
| 1380 | pci_set_drvdata(pci, NULL); | 1380 | pci_set_drvdata(pci, NULL); |
| 1381 | } | 1381 | } |
| 1382 | 1382 | ||
| 1383 | static struct pci_driver mixart_driver = { | 1383 | static struct pci_driver driver = { |
| 1384 | .name = KBUILD_MODNAME, | 1384 | .name = KBUILD_MODNAME, |
| 1385 | .id_table = snd_mixart_ids, | 1385 | .id_table = snd_mixart_ids, |
| 1386 | .probe = snd_mixart_probe, | 1386 | .probe = snd_mixart_probe, |
| 1387 | .remove = snd_mixart_remove, | 1387 | .remove = __devexit_p(snd_mixart_remove), |
| 1388 | }; | 1388 | }; |
| 1389 | 1389 | ||
| 1390 | module_pci_driver(mixart_driver); | 1390 | static int __init alsa_card_mixart_init(void) |
| 1391 | { | ||
| 1392 | return pci_register_driver(&driver); | ||
| 1393 | } | ||
| 1394 | |||
| 1395 | static void __exit alsa_card_mixart_exit(void) | ||
| 1396 | { | ||
| 1397 | pci_unregister_driver(&driver); | ||
| 1398 | } | ||
| 1399 | |||
| 1400 | module_init(alsa_card_mixart_init) | ||
| 1401 | module_exit(alsa_card_mixart_exit) | ||
