提交 3a3d2afd 编写于 作者: T Takashi Iwai

staging/media: Convert to snd_card_new() with a device pointer

Also remove superfluous snd_card_set_dev() calls.
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 b029a940
...@@ -245,7 +245,7 @@ int go7007_snd_init(struct go7007 *go) ...@@ -245,7 +245,7 @@ int go7007_snd_init(struct go7007 *go)
spin_lock_init(&gosnd->lock); spin_lock_init(&gosnd->lock);
gosnd->hw_ptr = gosnd->w_idx = gosnd->avail = 0; gosnd->hw_ptr = gosnd->w_idx = gosnd->avail = 0;
gosnd->capturing = 0; gosnd->capturing = 0;
ret = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, ret = snd_card_new(go->dev, index[dev], id[dev], THIS_MODULE, 0,
&gosnd->card); &gosnd->card);
if (ret < 0) { if (ret < 0) {
kfree(gosnd); kfree(gosnd);
...@@ -257,7 +257,6 @@ int go7007_snd_init(struct go7007 *go) ...@@ -257,7 +257,6 @@ int go7007_snd_init(struct go7007 *go)
kfree(gosnd); kfree(gosnd);
return ret; return ret;
} }
snd_card_set_dev(gosnd->card, go->dev);
ret = snd_pcm_new(gosnd->card, "go7007", 0, 0, 1, &gosnd->pcm); ret = snd_pcm_new(gosnd->card, "go7007", 0, 0, 1, &gosnd->pcm);
if (ret < 0) { if (ret < 0) {
snd_card_free(gosnd->card); snd_card_free(gosnd->card);
......
...@@ -366,7 +366,8 @@ int solo_g723_init(struct solo_dev *solo_dev) ...@@ -366,7 +366,8 @@ int solo_g723_init(struct solo_dev *solo_dev)
/* Allows for easier mapping between video and audio */ /* Allows for easier mapping between video and audio */
sprintf(name, "Softlogic%d", solo_dev->vfd->num); sprintf(name, "Softlogic%d", solo_dev->vfd->num);
ret = snd_card_create(SNDRV_DEFAULT_IDX1, name, THIS_MODULE, 0, ret = snd_card_new(&solo_dev->pdev->dev,
SNDRV_DEFAULT_IDX1, name, THIS_MODULE, 0,
&solo_dev->snd_card); &solo_dev->snd_card);
if (ret < 0) if (ret < 0)
return ret; return ret;
...@@ -377,7 +378,6 @@ int solo_g723_init(struct solo_dev *solo_dev) ...@@ -377,7 +378,6 @@ int solo_g723_init(struct solo_dev *solo_dev)
strcpy(card->shortname, "SOLO-6x10 Audio"); strcpy(card->shortname, "SOLO-6x10 Audio");
sprintf(card->longname, "%s on %s IRQ %d", card->shortname, sprintf(card->longname, "%s on %s IRQ %d", card->shortname,
pci_name(solo_dev->pdev), solo_dev->pdev->irq); pci_name(solo_dev->pdev), solo_dev->pdev->irq);
snd_card_set_dev(card, &solo_dev->pdev->dev);
ret = snd_device_new(card, SNDRV_DEV_LOWLEVEL, solo_dev, &ops); ret = snd_device_new(card, SNDRV_DEV_LOWLEVEL, solo_dev, &ops);
if (ret < 0) if (ret < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册