ALSA: pcmcia: Convert to snd_card_new() with a device pointer
authorTakashi Iwai <tiwai@suse.de>
Wed, 29 Jan 2014 13:37:20 +0000 (14:37 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 14 Feb 2014 07:14:06 +0000 (08:14 +0100)
Also remove superfluous snd_card_set_dev() calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pcmcia/pdaudiocf/pdaudiocf.c
sound/pcmcia/vx/vxpocket.c

index 8f489de5c4c6101567263c1deaa1b6bc5c0db080..56bda124cd4acfda66a3865761c2ffa1208009f7 100644 (file)
@@ -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;
@@ -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;
 
index d4db7ecaa6bf5c1aec13a0fdcbd12778c521af35..786e7e139c9eeae713a57ab334ea08bd1c6ce6f1 100644 (file)
@@ -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)
@@ -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;