Skip to content

Commit

Permalink
ALSA: pcmcia: Convert to snd_card_new() with a device pointer
Browse files Browse the repository at this point in the history
Also remove superfluous snd_card_set_dev() calls.

Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Feb 14, 2014
1 parent 5f32c31 commit 5815f55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions sound/pcmcia/pdaudiocf/pdaudiocf.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
return -ENODEV; /* disabled explicitly */

/* ok, create a card instance */
err = snd_card_create(index[i], id[i], THIS_MODULE, 0, &card);
err = snd_card_new(&link->dev, index[i], id[i], THIS_MODULE,
0, &card);
if (err < 0) {
snd_printk(KERN_ERR "pdacf: cannot create a card instance\n");
return err;
Expand All @@ -131,8 +132,6 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
return err;
}

snd_card_set_dev(card, &link->dev);

pdacf->index = i;
card_list[i] = card;

Expand Down
4 changes: 2 additions & 2 deletions sound/pcmcia/vx/vxpocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ static int vxpocket_config(struct pcmcia_device *link)
goto failed;

chip->dev = &link->dev;
snd_card_set_dev(chip->card, chip->dev);

if (snd_vxpocket_assign_resources(chip, link->resource[0]->start,
link->irq) < 0)
Expand Down Expand Up @@ -307,7 +306,8 @@ static int vxpocket_probe(struct pcmcia_device *p_dev)
return -ENODEV; /* disabled explicitly */

/* ok, create a card instance */
err = snd_card_create(index[i], id[i], THIS_MODULE, 0, &card);
err = snd_card_new(&p_dev->dev, index[i], id[i], THIS_MODULE,
0, &card);
if (err < 0) {
snd_printk(KERN_ERR "vxpocket: cannot create a card instance\n");
return err;
Expand Down

0 comments on commit 5815f55

Please sign in to comment.