summaryrefslogtreecommitdiff
path: root/sound/pci/asihpi/asihpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/asihpi/asihpi.c')
-rw-r--r--sound/pci/asihpi/asihpi.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c
index 5f2acd35dcb9..901c9490398a 100644
--- a/sound/pci/asihpi/asihpi.c
+++ b/sound/pci/asihpi/asihpi.c
@@ -1253,11 +1253,12 @@ static int snd_card_asihpi_pcm_new(struct snd_card_asihpi *asihpi, int device)
num_outstreams, num_instreams, &pcm);
if (err < 0)
return err;
+
/* pointer to ops struct is stored, dont change ops afterwards! */
- snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK,
- &snd_card_asihpi_playback_mmap_ops);
- snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE,
- &snd_card_asihpi_capture_mmap_ops);
+ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK,
+ &snd_card_asihpi_playback_mmap_ops);
+ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE,
+ &snd_card_asihpi_capture_mmap_ops);
pcm->private_data = asihpi;
pcm->info_flags = 0;
@@ -2827,17 +2828,13 @@ static int snd_asihpi_probe(struct pci_dev *pci_dev,
hpi = pci_get_drvdata(pci_dev);
adapter_index = hpi->adapter->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 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)
return err;
snd_printk(KERN_WARNING
@@ -2845,8 +2842,6 @@ static int snd_asihpi_probe(struct pci_dev *pci_dev,
adapter_index, card->number);
}
- snd_card_set_dev(card, &pci_dev->dev);
-
asihpi = card->private_data;
asihpi->card = card;
asihpi->pci = pci_dev;