diff options
Diffstat (limited to 'sound/pci/intel8x0m.c')
-rw-r--r-- | sound/pci/intel8x0m.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c index 15364d27804d..be604bb8445d 100644 --- a/sound/pci/intel8x0m.c +++ b/sound/pci/intel8x0m.c | |||
@@ -56,18 +56,15 @@ MODULE_SUPPORTED_DEVICE("{{Intel,82801AA-ICH}," | |||
56 | "{NVidia,NForce3 Modem}," | 56 | "{NVidia,NForce3 Modem}," |
57 | "{AMD,AMD768}}"); | 57 | "{AMD,AMD768}}"); |
58 | 58 | ||
59 | static int index[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -2}; /* Exclude the first card */ | 59 | static int index = -2; /* Exclude the first card */ |
60 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ | 60 | static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */ |
61 | static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ | 61 | static int ac97_clock = 0; |
62 | static int ac97_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; | ||
63 | 62 | ||
64 | module_param_array(index, int, NULL, 0444); | 63 | module_param(index, int, 0444); |
65 | MODULE_PARM_DESC(index, "Index value for Intel i8x0 modemcard."); | 64 | MODULE_PARM_DESC(index, "Index value for Intel i8x0 modemcard."); |
66 | module_param_array(id, charp, NULL, 0444); | 65 | module_param(id, charp, 0444); |
67 | MODULE_PARM_DESC(id, "ID string for Intel i8x0 modemcard."); | 66 | MODULE_PARM_DESC(id, "ID string for Intel i8x0 modemcard."); |
68 | module_param_array(enable, bool, NULL, 0444); | 67 | module_param(ac97_clock, int, 0444); |
69 | MODULE_PARM_DESC(enable, "Enable Intel i8x0 modemcard."); | ||
70 | module_param_array(ac97_clock, int, NULL, 0444); | ||
71 | MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (0 = auto-detect)."); | 68 | MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (0 = auto-detect)."); |
72 | 69 | ||
73 | /* | 70 | /* |
@@ -1263,20 +1260,12 @@ static struct shortname_table { | |||
1263 | static int __devinit snd_intel8x0m_probe(struct pci_dev *pci, | 1260 | static int __devinit snd_intel8x0m_probe(struct pci_dev *pci, |
1264 | const struct pci_device_id *pci_id) | 1261 | const struct pci_device_id *pci_id) |
1265 | { | 1262 | { |
1266 | static int dev; | ||
1267 | snd_card_t *card; | 1263 | snd_card_t *card; |
1268 | intel8x0_t *chip; | 1264 | intel8x0_t *chip; |
1269 | int err; | 1265 | int err; |
1270 | struct shortname_table *name; | 1266 | struct shortname_table *name; |
1271 | 1267 | ||
1272 | if (dev >= SNDRV_CARDS) | 1268 | card = snd_card_new(index, id, THIS_MODULE, 0); |
1273 | return -ENODEV; | ||
1274 | if (!enable[dev]) { | ||
1275 | dev++; | ||
1276 | return -ENOENT; | ||
1277 | } | ||
1278 | |||
1279 | card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); | ||
1280 | if (card == NULL) | 1269 | if (card == NULL) |
1281 | return -ENOMEM; | 1270 | return -ENOMEM; |
1282 | 1271 | ||
@@ -1295,7 +1284,7 @@ static int __devinit snd_intel8x0m_probe(struct pci_dev *pci, | |||
1295 | return err; | 1284 | return err; |
1296 | } | 1285 | } |
1297 | 1286 | ||
1298 | if ((err = snd_intel8x0_mixer(chip, ac97_clock[dev])) < 0) { | 1287 | if ((err = snd_intel8x0_mixer(chip, ac97_clock)) < 0) { |
1299 | snd_card_free(card); | 1288 | snd_card_free(card); |
1300 | return err; | 1289 | return err; |
1301 | } | 1290 | } |
@@ -1314,7 +1303,6 @@ static int __devinit snd_intel8x0m_probe(struct pci_dev *pci, | |||
1314 | return err; | 1303 | return err; |
1315 | } | 1304 | } |
1316 | pci_set_drvdata(pci, card); | 1305 | pci_set_drvdata(pci, card); |
1317 | dev++; | ||
1318 | return 0; | 1306 | return 0; |
1319 | } | 1307 | } |
1320 | 1308 | ||