diff options
author | Jaya Kumar <jayakumar.alsa@gmail.com> | 2006-05-19 06:04:22 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-06-22 15:33:52 -0400 |
commit | 77389b432344c811832962ca7f8181b8b3da3449 (patch) | |
tree | 2a48b7ef7e567b35ebb58692b1517acc785f5c22 | |
parent | 2851d963e0038c53d2175970daac4217abed7af2 (diff) |
[ALSA] Single variables for cs5535audio
As per Takashi's feedback, this is a cleanup to make cs5535audio be
single device per system. The diff is against 2.6.17-rc4 with
Takashi's patch adding the module_params for index, id and enable.
Signed-off-by: Jaya Kumar <jayakumar.alsa@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/cs5535audio/cs5535audio.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535audio.c index f61c4fa4ed62..8f46190f24ad 100644 --- a/sound/pci/cs5535audio/cs5535audio.c +++ b/sound/pci/cs5535audio/cs5535audio.c | |||
@@ -56,16 +56,17 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = { | |||
56 | {} | 56 | {} |
57 | }; | 57 | }; |
58 | 58 | ||
59 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; | 59 | static int index = SNDRV_DEFAULT_IDX1; |
60 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; | 60 | static char *id = SNDRV_DEFAULT_STR1; |
61 | static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; | 61 | /* for backward compatibility */ |
62 | static int enable; | ||
62 | 63 | ||
63 | module_param_array(index, int, NULL, 0444); | 64 | module_param(index, int, 0444); |
64 | MODULE_PARM_DESC(index, "Index value for " DRIVER_NAME); | 65 | MODULE_PARM_DESC(index, "Index value for " DRIVER_NAME); |
65 | module_param_array(id, charp, NULL, 0444); | 66 | module_param(id, charp, 0444); |
66 | MODULE_PARM_DESC(id, "ID string for " DRIVER_NAME); | 67 | MODULE_PARM_DESC(id, "ID string for " DRIVER_NAME); |
67 | module_param_array(enable, bool, NULL, 0444); | 68 | module_param(enable, bool, 0444); |
68 | MODULE_PARM_DESC(enable, "Enable " DRIVER_NAME); | 69 | MODULE_PARM_DESC(enable, "Enable for " DRIVER_NAME); |
69 | 70 | ||
70 | static struct pci_device_id snd_cs5535audio_ids[] __devinitdata = { | 71 | static struct pci_device_id snd_cs5535audio_ids[] __devinitdata = { |
71 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO) }, | 72 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO) }, |
@@ -357,12 +358,8 @@ static int __devinit snd_cs5535audio_probe(struct pci_dev *pci, | |||
357 | 358 | ||
358 | if (dev >= SNDRV_CARDS) | 359 | if (dev >= SNDRV_CARDS) |
359 | return -ENODEV; | 360 | return -ENODEV; |
360 | if (!enable[dev]) { | ||
361 | dev++; | ||
362 | return -ENOENT; | ||
363 | } | ||
364 | 361 | ||
365 | card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); | 362 | card = snd_card_new(index, id, THIS_MODULE, 0); |
366 | if (card == NULL) | 363 | if (card == NULL) |
367 | return -ENOMEM; | 364 | return -ENOMEM; |
368 | 365 | ||