@@ -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;
@@ -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;
@@ -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;
@@ -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);
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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,
@@ -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;
}
@@ -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;
@@ -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;
@@ -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;
@@ -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)) {
@@ -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);
@@ -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)
@@ -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;
@@ -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;
@@ -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;
@@ -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++) {
@@ -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;
@@ -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) {
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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);
@@ -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;
@@ -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);
@@ -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);
@@ -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);
@@ -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) {
@@ -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;
@@ -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);
@@ -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);
@@ -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);
@@ -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;
@@ -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++) {
@@ -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;
@@ -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;
}
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
}
Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de> --- sound/pci/ad1889.c | 5 ++--- sound/pci/ali5451/ali5451.c | 4 +--- sound/pci/als300.c | 5 ++--- sound/pci/als4000.c | 7 +++---- sound/pci/asihpi/asihpi.c | 16 +++++----------- sound/pci/atiixp.c | 4 +--- sound/pci/atiixp_modem.c | 4 +--- sound/pci/au88x0/au88x0.c | 5 ++--- sound/pci/aw2/aw2-alsa.c | 4 ++-- sound/pci/azt3328.c | 5 ++--- sound/pci/bt87x.c | 4 ++-- sound/pci/ca0106/ca0106_main.c | 5 ++--- sound/pci/cmipci.c | 5 ++--- sound/pci/cs4281.c | 5 ++--- sound/pci/cs46xx/cs46xx.c | 3 ++- sound/pci/cs46xx/cs46xx_lib.c | 2 -- sound/pci/cs5530.c | 4 ++-- sound/pci/cs5535audio/cs5535audio.c | 5 ++--- sound/pci/ctxfi/ctatc.c | 2 -- sound/pci/ctxfi/xfi.c | 3 ++- sound/pci/echoaudio/echoaudio.c | 5 ++--- sound/pci/emu10k1/emu10k1.c | 3 ++- sound/pci/emu10k1/emu10k1_main.c | 1 - sound/pci/emu10k1/emu10k1x.c | 5 ++--- sound/pci/ens1370.c | 5 ++--- sound/pci/es1938.c | 5 ++--- sound/pci/es1968.c | 5 ++--- sound/pci/fm801.c | 5 ++--- sound/pci/hda/hda_intel.c | 5 ++--- sound/pci/ice1712/ice1712.c | 5 ++--- sound/pci/ice1712/ice1724.c | 5 ++--- sound/pci/intel8x0.c | 4 +--- sound/pci/intel8x0m.c | 4 +--- sound/pci/korg1212/korg1212.c | 5 ++--- sound/pci/lola/lola.c | 5 ++--- sound/pci/lx6464es/lx6464es.c | 5 ++--- sound/pci/maestro3.c | 5 ++--- sound/pci/mixart/mixart.c | 5 ++--- sound/pci/nm256/nm256.c | 4 +--- sound/pci/oxygen/oxygen_lib.c | 4 ++-- sound/pci/pcxhr/pcxhr.c | 4 ++-- sound/pci/riptide/riptide.c | 5 ++--- sound/pci/rme32.c | 5 ++--- sound/pci/rme96.c | 5 ++--- sound/pci/rme9652/hdsp.c | 5 ++--- sound/pci/rme9652/hdspm.c | 6 ++---- sound/pci/rme9652/rme9652.c | 5 ++--- sound/pci/sis7019.c | 5 ++--- sound/pci/sonicvibes.c | 5 ++--- sound/pci/trident/trident.c | 3 ++- sound/pci/trident/trident_main.c | 1 - sound/pci/via82xx.c | 4 +--- sound/pci/via82xx_modem.c | 4 +--- sound/pci/vx222/vx222.c | 5 ++--- sound/pci/ymfpci/ymfpci.c | 3 ++- sound/pci/ymfpci/ymfpci_main.c | 2 -- 56 files changed, 98 insertions(+), 156 deletions(-)