|
@@ -2827,17 +2827,13 @@ static int snd_asihpi_probe(struct pci_dev *pci_dev,
|
|
hpi = pci_get_drvdata(pci_dev);
|
|
hpi = pci_get_drvdata(pci_dev);
|
|
adapter_index = hpi->adapter->index;
|
|
adapter_index = hpi->adapter->index;
|
|
/* first try to give the card the same index as its hardware index */
|
|
/* first try to give the card the same index as its hardware index */
|
|
- err = snd_card_create(adapter_index,
|
|
|
|
- id[adapter_index], THIS_MODULE,
|
|
|
|
- sizeof(struct snd_card_asihpi),
|
|
|
|
- &card);
|
|
|
|
|
|
+ err = snd_card_new(&pci_dev->dev, adapter_index, id[adapter_index],
|
|
|
|
+ THIS_MODULE, sizeof(struct snd_card_asihpi), &card);
|
|
if (err < 0) {
|
|
if (err < 0) {
|
|
/* if that fails, try the default index==next available */
|
|
/* if that fails, try the default index==next available */
|
|
- err =
|
|
|
|
- snd_card_create(index[dev], id[dev],
|
|
|
|
- THIS_MODULE,
|
|
|
|
- sizeof(struct snd_card_asihpi),
|
|
|
|
- &card);
|
|
|
|
|
|
+ err = snd_card_new(&pci_dev->dev, index[dev], id[dev],
|
|
|
|
+ THIS_MODULE, sizeof(struct snd_card_asihpi),
|
|
|
|
+ &card);
|
|
if (err < 0)
|
|
if (err < 0)
|
|
return err;
|
|
return err;
|
|
snd_printk(KERN_WARNING
|
|
snd_printk(KERN_WARNING
|
|
@@ -2845,8 +2841,6 @@ static int snd_asihpi_probe(struct pci_dev *pci_dev,
|
|
adapter_index, card->number);
|
|
adapter_index, card->number);
|
|
}
|
|
}
|
|
|
|
|
|
- snd_card_set_dev(card, &pci_dev->dev);
|
|
|
|
-
|
|
|
|
asihpi = card->private_data;
|
|
asihpi = card->private_data;
|
|
asihpi->card = card;
|
|
asihpi->card = card;
|
|
asihpi->pci = pci_dev;
|
|
asihpi->pci = pci_dev;
|