diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-01-29 14:20:19 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-12 11:17:52 +0100 |
commit | 60c5772b50fe8ce947685cfe3a80b9bf6ea92831 (patch) | |
tree | ad2d8a112bd708ff58f96ccb2ec7b15d88676379 /sound/pci/asihpi/asihpi.c | |
parent | ALSA: isa: Convert to snd_card_new() with a device pointer (diff) | |
download | linux-60c5772b50fe8ce947685cfe3a80b9bf6ea92831.tar.xz linux-60c5772b50fe8ce947685cfe3a80b9bf6ea92831.zip |
ALSA: pci: Convert to snd_card_new() with a device pointer
Also remove superfluous snd_card_set_dev() calls.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/asihpi/asihpi.c')
-rw-r--r-- | sound/pci/asihpi/asihpi.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c index 5f2acd35dcb9..e4e42f28177d 100644 --- a/sound/pci/asihpi/asihpi.c +++ b/sound/pci/asihpi/asihpi.c @@ -2827,17 +2827,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 +2841,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; |