ALSA: pci: Convert to snd_card_new() with a device pointer
authorTakashi Iwai <tiwai@suse.de>
Wed, 29 Jan 2014 13:20:19 +0000 (14:20 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 12 Feb 2014 10:17:52 +0000 (11:17 +0100)
Also remove superfluous snd_card_set_dev() calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
56 files changed:
sound/pci/ad1889.c
sound/pci/ali5451/ali5451.c
sound/pci/als300.c
sound/pci/als4000.c
sound/pci/asihpi/asihpi.c
sound/pci/atiixp.c
sound/pci/atiixp_modem.c
sound/pci/au88x0/au88x0.c
sound/pci/aw2/aw2-alsa.c
sound/pci/azt3328.c
sound/pci/bt87x.c
sound/pci/ca0106/ca0106_main.c
sound/pci/cmipci.c
sound/pci/cs4281.c
sound/pci/cs46xx/cs46xx.c
sound/pci/cs46xx/cs46xx_lib.c
sound/pci/cs5530.c
sound/pci/cs5535audio/cs5535audio.c
sound/pci/ctxfi/ctatc.c
sound/pci/ctxfi/xfi.c
sound/pci/echoaudio/echoaudio.c
sound/pci/emu10k1/emu10k1.c
sound/pci/emu10k1/emu10k1_main.c
sound/pci/emu10k1/emu10k1x.c
sound/pci/ens1370.c
sound/pci/es1938.c
sound/pci/es1968.c
sound/pci/fm801.c
sound/pci/hda/hda_intel.c
sound/pci/ice1712/ice1712.c
sound/pci/ice1712/ice1724.c
sound/pci/intel8x0.c
sound/pci/intel8x0m.c
sound/pci/korg1212/korg1212.c
sound/pci/lola/lola.c
sound/pci/lx6464es/lx6464es.c
sound/pci/maestro3.c
sound/pci/mixart/mixart.c
sound/pci/nm256/nm256.c
sound/pci/oxygen/oxygen_lib.c
sound/pci/pcxhr/pcxhr.c
sound/pci/riptide/riptide.c
sound/pci/rme32.c
sound/pci/rme96.c
sound/pci/rme9652/hdsp.c
sound/pci/rme9652/hdspm.c
sound/pci/rme9652/rme9652.c
sound/pci/sis7019.c
sound/pci/sonicvibes.c
sound/pci/trident/trident.c
sound/pci/trident/trident_main.c
sound/pci/via82xx.c
sound/pci/via82xx_modem.c
sound/pci/vx222/vx222.c
sound/pci/ymfpci/ymfpci.c
sound/pci/ymfpci/ymfpci_main.c

index b680d03e24192e0079e733ec0079d7e6b3ef4904..ba4da1ed0444158e531b7fddde78d8d6984b6824 100644 (file)
@@ -965,8 +965,6 @@ snd_ad1889_create(struct snd_card *card,
                return err;
        }
 
-       snd_card_set_dev(card, &pci->dev);
-
        *rchip = chip;
 
        return 0;
@@ -996,7 +994,8 @@ snd_ad1889_probe(struct pci_dev *pci,
        }
 
        /* (2) */
-       err = snd_card_create(index[devno], id[devno], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[devno], id[devno], THIS_MODULE,
+                          0, &card);
        /* XXX REVISIT: we can probably allocate chip in this call */
        if (err < 0)
                return err;
index c6835a3d64fb016df4cc865df0469a37a7181411..115b1120319ab15cd74d2f6888584f604229bbd2 100644 (file)
@@ -2218,8 +2218,6 @@ static int snd_ali_create(struct snd_card *card,
                return err;
        }
 
-       snd_card_set_dev(card, &pci->dev);
-
        /* initialise synth voices*/
        for (i = 0; i < ALI_CHANNELS; i++)
                codec->synth.voices[i].number = i;
@@ -2253,7 +2251,7 @@ static int snd_ali_probe(struct pci_dev *pci,
 
        snd_ali_printk("probe ...\n");
 
-       err = snd_card_create(index, id, THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index, id, THIS_MODULE, 0, &card);
        if (err < 0)
                return err;
 
index 591efb6eef05687a93ce4cd3b77a8a9134b6aa33..9acd88ab93a432029527220b25914743d716af1a 100644 (file)
@@ -761,8 +761,6 @@ static int snd_als300_create(struct snd_card *card,
                return err;
        }
 
-       snd_card_set_dev(card, &pci->dev);
-
        *rchip = chip;
        snd_als300_dbgcallleave();
        return 0;
@@ -829,7 +827,8 @@ static int snd_als300_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
 
        if (err < 0)
                return err;
index ffc821b0139e9a3566ca56856667f443ba954d35..2b2bb0fa3bc78ee832601d76b6b9f6974e44268e 100644 (file)
@@ -888,9 +888,9 @@ static int snd_card_als4000_probe(struct pci_dev *pci,
        pci_write_config_word(pci, PCI_COMMAND, word | PCI_COMMAND_IO);
        pci_set_master(pci);
        
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 
-                             sizeof(*acard) /* private_data: acard */,
-                             &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          sizeof(*acard) /* private_data: acard */,
+                          &card);
        if (err < 0) {
                pci_release_regions(pci);
                pci_disable_device(pci);
@@ -920,7 +920,6 @@ static int snd_card_als4000_probe(struct pci_dev *pci,
 
        chip->pci = pci;
        chip->alt_port = iobase;
-       snd_card_set_dev(card, &pci->dev);
 
        snd_als4000_configure(chip);
 
index 5f2acd35dcb9f4ccf26d6263e8fcba1f6a984683..e4e42f28177d8d54f73eb5d562146487d30d8e1a 100644 (file)
@@ -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;
index f6dec3ea371fa8c8e4e580af71d980e4c6595545..85f893b5cc9921aa9f1c5030139352fdee858af2 100644 (file)
@@ -1657,8 +1657,6 @@ static int snd_atiixp_create(struct snd_card *card,
                return err;
        }
 
-       snd_card_set_dev(card, &pci->dev);
-
        *r_chip = chip;
        return 0;
 }
@@ -1671,7 +1669,7 @@ static int snd_atiixp_probe(struct pci_dev *pci,
        struct atiixp *chip;
        int err;
 
-       err = snd_card_create(index, id, THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index, id, THIS_MODULE, 0, &card);
        if (err < 0)
                return err;
 
index 289563ecb6dd704e0a3f89d81ca19afef63cf98a..2b3244a85cf8691638f2bbfd52067b4e2e24adf1 100644 (file)
@@ -1282,8 +1282,6 @@ static int snd_atiixp_create(struct snd_card *card,
                return err;
        }
 
-       snd_card_set_dev(card, &pci->dev);
-
        *r_chip = chip;
        return 0;
 }
@@ -1296,7 +1294,7 @@ static int snd_atiixp_probe(struct pci_dev *pci,
        struct atiixp_modem *chip;
        int err;
 
-       err = snd_card_create(index, id, THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index, id, THIS_MODULE, 0, &card);
        if (err < 0)
                return err;
 
index 7059dd69e5e611598530edf8ba6b6beba7a16050..afb1b44b741e0d31c51ad0afa92150cb9bf0ec54 100644 (file)
@@ -211,8 +211,6 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
                goto alloc_out;
        }
 
-       snd_card_set_dev(card, &pci->dev);
-
        *rchip = chip;
 
        return 0;
@@ -250,7 +248,8 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
                return -ENOENT;
        }
        // (2)
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
 
index 2925220d3fcf84afdd27c0636b5b1939cd087f3f..e9dabee42805c4edb7fcd3bed1e9abf4f25e02c9 100644 (file)
@@ -322,7 +322,6 @@ static int snd_aw2_create(struct snd_card *card,
                return err;
        }
 
-       snd_card_set_dev(card, &pci->dev);
        *rchip = chip;
 
        printk(KERN_INFO
@@ -349,7 +348,8 @@ static int snd_aw2_probe(struct pci_dev *pci,
        }
 
        /* (2) Create card instance */
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
 
index 1aef7128f7caa97e0daacaeb312ee60d1ec9225f..641c235ab4d83f1fca59d864e4e06af20ae0dec2 100644 (file)
@@ -2599,8 +2599,6 @@ snd_azf3328_create(struct snd_card *card,
                spin_unlock_irq(codec->lock);
        }
 
-       snd_card_set_dev(card, &pci->dev);
-
        *rchip = chip;
 
        err = 0;
@@ -2635,7 +2633,8 @@ snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
                goto out;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                goto out;
 
index 18802039497afd3dfcafdd53dd1d0d62e503c4cc..06dc7d97cc0ca3f94bfa1308b86b33ee5f179b28 100644 (file)
@@ -773,7 +773,6 @@ static int snd_bt87x_create(struct snd_card *card,
        if (err < 0)
                goto fail;
 
-       snd_card_set_dev(card, &pci->dev);
        *rchip = chip;
        return 0;
 
@@ -888,7 +887,8 @@ static int snd_bt87x_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
 
index f4db5587e86ee9b3f509d1541b9ae85c0a64cbab..f659c7a89c0cf8dec8cff845a2f4afd5973437ff 100644 (file)
@@ -1843,7 +1843,8 @@ static int snd_ca0106_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
 
@@ -1878,8 +1879,6 @@ static int snd_ca0106_probe(struct pci_dev *pci,
        snd_ca0106_proc_init(chip);
 #endif
 
-       snd_card_set_dev(card, &pci->dev);
-
        err = snd_card_register(card);
        if (err < 0)
                goto error;
index 2755ec5bcc258d695d534f3ca99d895218c49215..66c0558ce44924e34e3d083f2ff83db6a200b193 100644 (file)
@@ -3254,8 +3254,6 @@ static int snd_cmipci_create(struct snd_card *card, struct pci_dev *pci,
        if (snd_cmipci_create_gameport(cm, dev) < 0)
                snd_cmipci_clear_bit(cm, CM_REG_FUNCTRL1, CM_JYSTK_EN);
 
-       snd_card_set_dev(card, &pci->dev);
-
        *rcmipci = cm;
        return 0;
 }
@@ -3280,7 +3278,8 @@ static int snd_cmipci_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
        
index 1dc793e742d79845b3e92d6da1ac204f971a6ef8..2bd55177b1ae3f5828eeebdd4f5cd6016ed6d56b 100644 (file)
@@ -1402,8 +1402,6 @@ static int snd_cs4281_create(struct snd_card *card,
 
        snd_cs4281_proc_init(chip);
 
-       snd_card_set_dev(card, &pci->dev);
-
        *rchip = chip;
        return 0;
 }
@@ -1917,7 +1915,8 @@ static int snd_cs4281_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
 
index b03498325d661d091ca18d84614fdebd1fb22032..af0eacbc8bd2097ab6c5112b116381194d7db730 100644 (file)
@@ -88,7 +88,8 @@ static int snd_card_cs46xx_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
        if ((err = snd_cs46xx_create(card, pci,
index 062398ec5335f613b2b8e78e49d6374fc98bcdfc..28766478f81c37ff58dd63d7a9d858ec7b6e2810 100644 (file)
@@ -4058,8 +4058,6 @@ int snd_cs46xx_create(struct snd_card *card,
 
        chip->active_ctrl(chip, -1); /* disable CLKRUN */
 
-       snd_card_set_dev(card, &pci->dev);
-
        *rchip = chip;
        return 0;
 }
index c6b82c85e044b9eec35e212f2dc487452651430e..8037e8600a72dcd7d0a95717487801db7871e665 100644 (file)
@@ -244,7 +244,6 @@ static int snd_cs5530_create(struct snd_card *card,
                return err;
        }
 
-       snd_card_set_dev(card, &pci->dev);
        *rchip = chip;
        return 0;
 }
@@ -264,7 +263,8 @@ static int snd_cs5530_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
 
        if (err < 0)
                return err;
index c0d2835344dab60a8f2fef5f934a103d6fdd933f..051b3e28e3414a9990e3e0c89069888e5687f2db 100644 (file)
@@ -324,8 +324,6 @@ static int snd_cs5535audio_create(struct snd_card *card,
                                  cs5535au, &ops)) < 0)
                goto sndfail;
 
-       snd_card_set_dev(card, &pci->dev);
-
        *rcs5535au = cs5535au;
        return 0;
 
@@ -353,7 +351,8 @@ static int snd_cs5535audio_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
 
index eb86829529eb3e7f56da61324f8f16a87f3a44c6..af632bd08323feaf0f9ab2d3098375e12f38d46b 100644 (file)
@@ -1739,8 +1739,6 @@ int ct_atc_create(struct snd_card *card, struct pci_dev *pci,
        if (err < 0)
                goto error1;
 
-       snd_card_set_dev(card, &pci->dev);
-
        *ratc = atc;
        return 0;
 
index d464ad2fc7b71632afd81df4ef0e3ea4dda265f2..98426d09c8bd7ac6e46dd7b49ef272fc0a99bfb8 100644 (file)
@@ -71,7 +71,8 @@ ct_card_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
                dev++;
                return -ENOENT;
        }
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err)
                return err;
        if ((reference_rate != 48000) && (reference_rate != 44100)) {
index 05cfe551ce425b6d4049755688d6d76883e768c8..1ef77c0d39ecc810b7893ff3f624e8a89bdd8144 100644 (file)
@@ -2058,12 +2058,11 @@ static int snd_echo_probe(struct pci_dev *pci,
 
        DE_INIT(("Echoaudio driver starting...\n"));
        i = 0;
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
 
-       snd_card_set_dev(card, &pci->dev);
-
        chip = NULL;    /* Tells snd_echo_create to allocate chip */
        if ((err = snd_echo_create(card, pci, &chip)) < 0) {
                snd_card_free(card);
index 9e1bd0c39a8cf27230bd50196a525d1c2c3f525d..5c0413b40dc31f34925683ddb2a636358e6ccbc8 100644 (file)
@@ -117,7 +117,8 @@ static int snd_card_emu10k1_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
        if (max_buffer_size[dev] < 32)
index bdd888ec9a8422838144fd93e8c8b8cff92ee4fe..75504da6361317bca8188dfe72d941b0a0314157 100644 (file)
@@ -2021,7 +2021,6 @@ int snd_emu10k1_create(struct snd_card *card,
        snd_emu10k1_proc_init(emu);
 #endif
 
-       snd_card_set_dev(card, &pci->dev);
        *remu = emu;
        return 0;
 
index 56ad9d6f200df7daa7de21fea6d7d59ef502c881..3988eaa778cfd8763e9d778b60daf32f3c33a457 100644 (file)
@@ -1564,7 +1564,8 @@ static int snd_emu10k1x_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
 
@@ -1608,8 +1609,6 @@ static int snd_emu10k1x_probe(struct pci_dev *pci,
        sprintf(card->longname, "%s at 0x%lx irq %i",
                card->shortname, chip->port, chip->irq);
 
-       snd_card_set_dev(card, &pci->dev);
-
        if ((err = snd_card_register(card)) < 0) {
                snd_card_free(card);
                return err;
index 61262f396004b50a2aca06af03bfaa9d37686b29..0f89d2a2090e1bc20c63f351a7fda84f0aee8745 100644 (file)
@@ -2180,8 +2180,6 @@ static int snd_ensoniq_create(struct snd_card *card,
 
        snd_ensoniq_proc_init(ensoniq);
 
-       snd_card_set_dev(card, &pci->dev);
-
        *rensoniq = ensoniq;
        return 0;
 }
@@ -2437,7 +2435,8 @@ static int snd_audiopci_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
 
index 9213fb38921c6b7687bfaaa262c6c3b3de0a09d3..33489bcc0aff8cdc10d8f6463944e67ee9028881 100644 (file)
@@ -1658,8 +1658,6 @@ static int snd_es1938_create(struct snd_card *card,
                return err;
        }
 
-       snd_card_set_dev(card, &pci->dev);
-
        *rchip = chip;
        return 0;
 }
@@ -1808,7 +1806,8 @@ static int snd_es1938_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
        for (idx = 0; idx < 5; idx++) {
index 772cc36f951de1929d9ef69962688cd51f502537..87e9cd5d3cebbd65670f82cbf4365adee9063ff9 100644 (file)
@@ -2783,8 +2783,6 @@ static int snd_es1968_create(struct snd_card *card,
                return err;
        }
 
-       snd_card_set_dev(card, &pci->dev);
-
 #ifdef CONFIG_SND_ES1968_RADIO
        /* don't play with GPIOs on laptops */
        if (chip->pci->subsystem_vendor != 0x125d)
@@ -2836,7 +2834,8 @@ static int snd_es1968_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
                 
index 45bc8a95b7c44f2f35fdd0013e6695d328bdc69f..8b6af212cbfefcb314ca937a74574a082637c786 100644 (file)
@@ -1251,8 +1251,6 @@ static int snd_fm801_create(struct snd_card *card,
                return err;
        }
 
-       snd_card_set_dev(card, &pci->dev);
-
 #ifdef CONFIG_SND_FM801_TEA575X_BOOL
        err = v4l2_device_register(&pci->dev, &chip->v4l2_dev);
        if (err < 0) {
@@ -1312,7 +1310,8 @@ static int snd_card_fm801_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
        if ((err = snd_fm801_create(card, pci, tea575x_tuner[dev], radio_nr[dev], &chip)) < 0) {
index d8d9bf3c37872e2acf6005f4c465ec92fc5f0934..0870f5f3ed1ceef940709036744bb47d0f2a6712 100644 (file)
@@ -3823,14 +3823,13 @@ static int azx_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0) {
                snd_printk(KERN_ERR "hda-intel: Error creating card!\n");
                return err;
        }
 
-       snd_card_set_dev(card, &pci->dev);
-
        err = azx_create(card, pci, dev, pci_id->driver_data, &chip);
        if (err < 0)
                goto out_free;
index 28ec872e54c01350369bf47f143db9c2d5da8b8d..99c022a0d61247d00231b85be36b1c4119da4c29 100644 (file)
@@ -2639,8 +2639,6 @@ static int snd_ice1712_create(struct snd_card *card,
                return err;
        }
 
-       snd_card_set_dev(card, &pci->dev);
-
        *r_ice1712 = ice;
        return 0;
 }
@@ -2670,7 +2668,8 @@ static int snd_ice1712_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
 
index 50047177829172f97c0c6b9302854bdd8b0aca93..cf1ba116a7723c04bdd9890bc6ca08353a88c458 100644 (file)
@@ -2609,8 +2609,6 @@ static int snd_vt1724_create(struct snd_card *card,
                return err;
        }
 
-       snd_card_set_dev(card, &pci->dev);
-
        *r_ice1712 = ice;
        return 0;
 }
@@ -2638,7 +2636,8 @@ static int snd_vt1724_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
 
index 08d8733604a2ed981d1c5ac32e095c452e56a431..ff24acf06bdd3ed283e27491c77e432a38eb5254 100644 (file)
@@ -3217,8 +3217,6 @@ static int snd_intel8x0_create(struct snd_card *card,
                return err;
        }
 
-       snd_card_set_dev(card, &pci->dev);
-
        *r_intel8x0 = chip;
        return 0;
 }
@@ -3285,7 +3283,7 @@ static int snd_intel8x0_probe(struct pci_dev *pci,
        int err;
        struct shortname_table *name;
 
-       err = snd_card_create(index, id, THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index, id, THIS_MODULE, 0, &card);
        if (err < 0)
                return err;
 
index 3573c11936656d8f1b003573d559494618c7a694..f8c72bd8a3cd761f94b7cd901cb10b9d14df0cb5 100644 (file)
@@ -1243,8 +1243,6 @@ static int snd_intel8x0m_create(struct snd_card *card,
                return err;
        }
 
-       snd_card_set_dev(card, &pci->dev);
-
        *r_intel8x0m = chip;
        return 0;
 }
@@ -1283,7 +1281,7 @@ static int snd_intel8x0m_probe(struct pci_dev *pci,
        int err;
        struct shortname_table *name;
 
-       err = snd_card_create(index, id, THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index, id, THIS_MODULE, 0, &card);
        if (err < 0)
                return err;
 
index 9cf9829555d422a250cff10dd956b23e09dca996..8f36d77f01e5573620c6660d9e8a6b0d3d4810b0 100644 (file)
@@ -2418,8 +2418,6 @@ static int snd_korg1212_create(struct snd_card *card, struct pci_dev *pci,
 
         snd_korg1212_proc_init(korg1212);
         
-       snd_card_set_dev(card, &pci->dev);
-
         * rchip = korg1212;
        return 0;
 
@@ -2445,7 +2443,8 @@ snd_korg1212_probe(struct pci_dev *pci,
                dev++;
                return -ENOENT;
        }
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
 
index 0568540dc8d353995879ba6ab26be56360b164e4..56d4f94daea2fdd3f9e055ddb69a7b250d99632d 100644 (file)
@@ -717,14 +717,13 @@ static int lola_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0) {
                snd_printk(KERN_ERR SFX "Error creating card!\n");
                return err;
        }
 
-       snd_card_set_dev(card, &pci->dev);
-
        err = lola_create(card, pci, dev, &chip);
        if (err < 0)
                goto out_free;
index 5fcaaa6da4a811b1bc1ae3e4a6fe431b90b378de..b9743d4fa1cc838733325d3d399484e157556e10 100644 (file)
@@ -1062,8 +1062,6 @@ static int snd_lx6464es_create(struct snd_card *card,
        if (err < 0)
                return err;
 
-       snd_card_set_dev(card, &pci->dev);
-
        *rchip = chip;
        return 0;
 
@@ -1099,7 +1097,8 @@ static int snd_lx6464es_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
 
index d5417360f51fb8be6a43be6ddef9bd6c2e7ac2e3..076c3ec000c0b9f130551602bec521fdb14d6a1c 100644 (file)
@@ -2693,8 +2693,6 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci,
        snd_m3_enable_ints(chip);
        snd_m3_assp_continue(chip);
 
-       snd_card_set_dev(card, &pci->dev);
-
        *chip_ret = chip;
 
        return 0; 
@@ -2721,7 +2719,8 @@ snd_m3_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
 
index 1e0f6ee193f0a926279e3d3d25a4ea995b78bfdd..9ab057bb985906078ac31cbc6c3e35901fef5661 100644 (file)
@@ -1028,8 +1028,6 @@ static int snd_mixart_create(struct mixart_mgr *mgr, struct snd_card *card, int
        }
 
        mgr->chip[idx] = chip;
-       snd_card_set_dev(card, &mgr->pci->dev);
-
        return 0;
 }
 
@@ -1308,7 +1306,8 @@ static int snd_mixart_probe(struct pci_dev *pci,
                else
                        idx = index[dev] + i;
                snprintf(tmpid, sizeof(tmpid), "%s-%d", id[dev] ? id[dev] : "MIXART", i);
-               err = snd_card_create(idx, tmpid, THIS_MODULE, 0, &card);
+               err = snd_card_new(&pci->dev, idx, tmpid, THIS_MODULE,
+                                  0, &card);
 
                if (err < 0) {
                        snd_printk(KERN_ERR "cannot allocate the card %d\n", i);
index fe79fff4c6dc303fd3a5babde6320446979a3f14..b7afd9c8dcd78cef6199d08d5f6285ee7d9cabba 100644 (file)
@@ -1626,8 +1626,6 @@ snd_nm256_create(struct snd_card *card, struct pci_dev *pci,
        if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0)
                goto __error;
 
-       snd_card_set_dev(card, &pci->dev);
-
        *chip_ret = chip;
        return 0;
 
@@ -1676,7 +1674,7 @@ static int snd_nm256_probe(struct pci_dev *pci,
                }
        }
 
-       err = snd_card_create(index, id, THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index, id, THIS_MODULE, 0, &card);
        if (err < 0)
                return err;
 
index b0cb48adddc790c3f87e7a52cdb0431430e13ce2..efa610cd735c234b66931e28e95d1bba33f66fe1 100644 (file)
@@ -595,7 +595,8 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
        const struct pci_device_id *pci_id;
        int err;
 
-       err = snd_card_create(index, id, owner, sizeof(*chip), &card);
+       err = snd_card_new(&pci->dev, index, id, owner,
+                          sizeof(*chip), &card);
        if (err < 0)
                return err;
 
@@ -648,7 +649,6 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
        }
 
        pci_set_master(pci);
-       snd_card_set_dev(card, &pci->dev);
        card->private_free = oxygen_card_free;
 
        configure_pcie_bridge(pci);
index d379b284955b23dea2cded6e8efe7e0ba17ccda2..3880f6da9a87ed9b6f55faef6fdebca45da84916 100644 (file)
@@ -1239,7 +1239,6 @@ static int pcxhr_create(struct pcxhr_mgr *mgr,
        }
 
        mgr->chip[idx] = chip;
-       snd_card_set_dev(card, &mgr->pci->dev);
 
        return 0;
 }
@@ -1638,7 +1637,8 @@ static int pcxhr_probe(struct pci_dev *pci,
 
                snprintf(tmpid, sizeof(tmpid), "%s-%d",
                         id[dev] ? id[dev] : card_name, i);
-               err = snd_card_create(idx, tmpid, THIS_MODULE, 0, &card);
+               err = snd_card_new(&pci->dev, idx, tmpid, THIS_MODULE,
+                                  0, &card);
 
                if (err < 0) {
                        snd_printk(KERN_ERR "cannot allocate the card %d\n", i);
index 56cc891e395e54a17edf0a80b377370b317c628c..b4a8278241b12ffc4d33c82841cccb96a5cafdcf 100644 (file)
@@ -1916,8 +1916,6 @@ snd_riptide_create(struct snd_card *card, struct pci_dev *pci,
                return err;
        }
 
-       snd_card_set_dev(card, &pci->dev);
-
        *rchip = chip;
        return 0;
 }
@@ -2086,7 +2084,8 @@ snd_card_riptide_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
        err = snd_riptide_create(card, pci, &chip);
index cc26346ae66bf82d6fc4680b56ed4f136ff832ab..77465cc03e956dbcbb909559616bdd1a7ecf441f 100644 (file)
@@ -1938,15 +1938,14 @@ snd_rme32_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE,
-                             sizeof(struct rme32), &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          sizeof(struct rme32), &card);
        if (err < 0)
                return err;
        card->private_free = snd_rme32_card_free;
        rme32 = (struct rme32 *) card->private_data;
        rme32->card = card;
        rme32->pci = pci;
-       snd_card_set_dev(card, &pci->dev);
         if (fullduplex[dev])
                rme32->fullduplex_mode = 1;
        if ((err = snd_rme32_create(rme32)) < 0) {
index 0236363c301f8e12b7f15a218af5fbcdfb06b25c..00d46116e04a34d4a1ec84e21d8b25ac0632bdca 100644 (file)
@@ -2475,15 +2475,14 @@ snd_rme96_probe(struct pci_dev *pci,
                dev++;
                return -ENOENT;
        }
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE,
-                             sizeof(struct rme96), &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          sizeof(struct rme96), &card);
        if (err < 0)
                return err;
        card->private_free = snd_rme96_card_free;
        rme96 = card->private_data;
        rme96->card = card;
        rme96->pci = pci;
-       snd_card_set_dev(card, &pci->dev);
        if ((err = snd_rme96_create(rme96)) < 0) {
                snd_card_free(card);
                return err;
index bd90c80bb494e7049d830f13a3e6db46395d09cc..825fbbea7f6ffa9a687197acad91a30135b135c6 100644 (file)
@@ -5375,8 +5375,8 @@ static int snd_hdsp_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE,
-                             sizeof(struct hdsp), &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          sizeof(struct hdsp), &card);
        if (err < 0)
                return err;
 
@@ -5384,7 +5384,6 @@ static int snd_hdsp_probe(struct pci_dev *pci,
        card->private_free = snd_hdsp_card_free;
        hdsp->dev = dev;
        hdsp->pci = pci;
-       snd_card_set_dev(card, &pci->dev);
 
        if ((err = snd_hdsp_create(card, hdsp)) < 0) {
                snd_card_free(card);
index e98dc008de0b91e4b7e73f776081893fafa04084..76016287e46f4361e25262b7cbb42ef38f4b382f 100644 (file)
@@ -7016,8 +7016,8 @@ static int snd_hdspm_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev],
-                       THIS_MODULE, sizeof(struct hdspm), &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev],
+                          THIS_MODULE, sizeof(struct hdspm), &card);
        if (err < 0)
                return err;
 
@@ -7026,8 +7026,6 @@ static int snd_hdspm_probe(struct pci_dev *pci,
        hdspm->dev = dev;
        hdspm->pci = pci;
 
-       snd_card_set_dev(card, &pci->dev);
-
        err = snd_hdspm_create(card, hdspm);
        if (err < 0) {
                snd_card_free(card);
index 1503ee3585fddee141b5df731055325b6a1292cc..a62d6e13d8ced09b333145f2d912d4086c125d94 100644 (file)
@@ -2587,8 +2587,8 @@ static int snd_rme9652_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE,
-                             sizeof(struct snd_rme9652), &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          sizeof(struct snd_rme9652), &card);
 
        if (err < 0)
                return err;
@@ -2597,7 +2597,6 @@ static int snd_rme9652_probe(struct pci_dev *pci,
        card->private_free = snd_rme9652_card_free;
        rme9652->dev = dev;
        rme9652->pci = pci;
-       snd_card_set_dev(card, &pci->dev);
 
        if ((err = snd_rme9652_create(card, rme9652, precise_ptr[dev])) < 0) {
                snd_card_free(card);
index e413b4e2c81952101294d993dba70aee9c1a14fb..6b26b93e001d89fa4c80fe3e6e52e1392b1f2c27 100644 (file)
@@ -1404,8 +1404,6 @@ static int sis_chip_create(struct snd_card *card,
        if (rc)
                goto error_out_cleanup;
 
-       snd_card_set_dev(card, &pci->dev);
-
        return 0;
 
 error_out_cleanup:
@@ -1440,7 +1438,8 @@ static int snd_sis7019_probe(struct pci_dev *pci,
        if (!codecs)
                codecs = SIS_PRIMARY_CODEC_PRESENT;
 
-       rc = snd_card_create(index, id, THIS_MODULE, sizeof(*sis), &card);
+       rc = snd_card_new(&pci->dev, index, id, THIS_MODULE,
+                         sizeof(*sis), &card);
        if (rc < 0)
                goto error_out;
 
index 2a46bf98af30f054a20109ada2a17115de05b127..9ff408fff7b00ab9d1182bc4339cd5a4bcf73227 100644 (file)
@@ -1392,8 +1392,6 @@ static int snd_sonicvibes_create(struct snd_card *card,
 
        snd_sonicvibes_proc_init(sonic);
 
-       snd_card_set_dev(card, &pci->dev);
-
        *rsonic = sonic;
        return 0;
 }
@@ -1459,7 +1457,8 @@ static int snd_sonic_probe(struct pci_dev *pci,
                return -ENOENT;
        }
  
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
        for (idx = 0; idx < 5; idx++) {
index b3b588bc94c37720dd20026589b39ae342a9890d..d852458caf386f651614a375ceac3c0bd27f96cd 100644 (file)
@@ -89,7 +89,8 @@ static int snd_trident_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
 
index fb0e1586a6f87cc25bbce39a64744e1fea468de5..4f3c4be30a482db66c8ea19d9545e7f749145e68 100644 (file)
@@ -3664,7 +3664,6 @@ int snd_trident_create(struct snd_card *card,
        snd_trident_enable_eso(trident);
 
        snd_trident_proc_init(trident);
-       snd_card_set_dev(card, &pci->dev);
        *rtrident = trident;
        return 0;
 }
index 5ae6f042c586f61e94127ac91979e5e5c0407df8..20d2eeeecf475e316de26f887496dc62eb619bee 100644 (file)
@@ -2441,8 +2441,6 @@ static int snd_via82xx_create(struct snd_card *card,
         * We call pci_set_master here because it does not hurt. */
        pci_set_master(pci);
 
-       snd_card_set_dev(card, &pci->dev);
-
        *r_via = chip;
        return 0;
 }
@@ -2544,7 +2542,7 @@ static int snd_via82xx_probe(struct pci_dev *pci,
        unsigned int i;
        int err;
 
-       err = snd_card_create(index, id, THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index, id, THIS_MODULE, 0, &card);
        if (err < 0)
                return err;
 
index ca190283cbd7745f50d4ec4ffeaf74726ea3afc1..519740154824a26518d29157330431aee2aaef08 100644 (file)
@@ -1161,8 +1161,6 @@ static int snd_via82xx_create(struct snd_card *card,
         * We call pci_set_master here because it does not hurt. */
        pci_set_master(pci);
 
-       snd_card_set_dev(card, &pci->dev);
-
        *r_via = chip;
        return 0;
 }
@@ -1177,7 +1175,7 @@ static int snd_via82xx_probe(struct pci_dev *pci,
        unsigned int i;
        int err;
 
-       err = snd_card_create(index, id, THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index, id, THIS_MODULE, 0, &card);
        if (err < 0)
                return err;
 
index ab8a9b1bfb8e21933290e86be80a4f8a6459313b..4323556c13f896a6269c5f250d09e887507e8323 100644 (file)
@@ -181,8 +181,6 @@ static int snd_vx222_create(struct snd_card *card, struct pci_dev *pci,
                return err;
        }
 
-       snd_card_set_dev(card, &pci->dev);
-
        *rchip = vx;
        return 0;
 }
@@ -204,7 +202,8 @@ static int snd_vx222_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
 
index e8932b2e4a5dcce73f4a2417933d90cf618079cb..6ff4ea389b02559e4bf2f3eb9d335a021cdb4e19 100644 (file)
@@ -187,7 +187,8 @@ static int snd_card_ymfpci_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
 
index d591c154fc58fc4a9aeb3a5407e500b24d7e4996..c7e98ff4f80ffe30384bfe4ed45d98bd5992df11 100644 (file)
@@ -2487,8 +2487,6 @@ int snd_ymfpci_create(struct snd_card *card,
 
        snd_ymfpci_proc_init(card, chip);
 
-       snd_card_set_dev(card, &pci->dev);
-
        *rchip = chip;
        return 0;
 }
This page took 0.052626 seconds and 5 git commands to generate.