You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
ALSA: Convert to snd_card_create() in other sound/*
Convert from snd_card_new() to the new snd_card_create() function in other sound subdirectories. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
committed by
Takashi Iwai
parent
e58de7baf7
commit
bd7dd77c2a
@@ -23,9 +23,10 @@ int aoa_alsa_init(char *name, struct module *mod, struct device *dev)
|
||||
/* cannot be EEXIST due to usage in aoa_fabric_register */
|
||||
return -EBUSY;
|
||||
|
||||
alsa_card = snd_card_new(index, name, mod, sizeof(struct aoa_card));
|
||||
if (!alsa_card)
|
||||
return -ENOMEM;
|
||||
err = snd_card_create(index, name, mod, sizeof(struct aoa_card),
|
||||
&alsa_card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
aoa_card = alsa_card->private_data;
|
||||
aoa_card->alsa_card = alsa_card;
|
||||
alsa_card->dev = dev;
|
||||
|
||||
+4
-3
@@ -995,10 +995,11 @@ static struct aaci * __devinit aaci_init_card(struct amba_device *dev)
|
||||
{
|
||||
struct aaci *aaci;
|
||||
struct snd_card *card;
|
||||
int err;
|
||||
|
||||
card = snd_card_new(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
|
||||
THIS_MODULE, sizeof(struct aaci));
|
||||
if (card == NULL)
|
||||
err = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
|
||||
THIS_MODULE, sizeof(struct aaci), &card);
|
||||
if (err < 0)
|
||||
return NULL;
|
||||
|
||||
card->private_free = aaci_free_card;
|
||||
|
||||
@@ -173,10 +173,9 @@ static int __devinit pxa2xx_ac97_probe(struct platform_device *dev)
|
||||
struct snd_ac97_template ac97_template;
|
||||
int ret;
|
||||
|
||||
ret = -ENOMEM;
|
||||
card = snd_card_new(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
|
||||
THIS_MODULE, 0);
|
||||
if (!card)
|
||||
ret = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
|
||||
THIS_MODULE, 0, &card);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
card->dev = &dev->dev;
|
||||
|
||||
@@ -887,9 +887,10 @@ static int __devinit sa11xx_uda1341_probe(struct platform_device *devptr)
|
||||
struct sa11xx_uda1341 *chip;
|
||||
|
||||
/* register the soundcard */
|
||||
card = snd_card_new(-1, id, THIS_MODULE, sizeof(struct sa11xx_uda1341));
|
||||
if (card == NULL)
|
||||
return -ENOMEM;
|
||||
err = snd_card_create(-1, id, THIS_MODULE,
|
||||
sizeof(struct sa11xx_uda1341), &card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
chip = card->private_data;
|
||||
spin_lock_init(&chip->s[0].dma_lock);
|
||||
|
||||
@@ -588,10 +588,10 @@ static int __devinit snd_dummy_probe(struct platform_device *devptr)
|
||||
int idx, err;
|
||||
int dev = devptr->id;
|
||||
|
||||
card = snd_card_new(index[dev], id[dev], THIS_MODULE,
|
||||
sizeof(struct snd_dummy));
|
||||
if (card == NULL)
|
||||
return -ENOMEM;
|
||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE,
|
||||
sizeof(struct snd_dummy), &card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
dummy = card->private_data;
|
||||
dummy->card = card;
|
||||
for (idx = 0; idx < MAX_PCM_DEVICES && idx < pcm_devs[dev]; idx++) {
|
||||
|
||||
@@ -1279,9 +1279,9 @@ static int __devinit snd_ml403_ac97cr_probe(struct platform_device *pfdev)
|
||||
if (!enable[dev])
|
||||
return -ENOENT;
|
||||
|
||||
card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
|
||||
if (card == NULL)
|
||||
return -ENOMEM;
|
||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = snd_ml403_ac97cr_create(card, pfdev, &ml403_ac97cr);
|
||||
if (err < 0) {
|
||||
PDEBUG(INIT_FAILURE, "probe(): create failed!\n");
|
||||
|
||||
@@ -73,9 +73,9 @@ static int snd_mpu401_create(int dev, struct snd_card **rcard)
|
||||
snd_printk(KERN_ERR "the uart_enter option is obsolete; remove it\n");
|
||||
|
||||
*rcard = NULL;
|
||||
card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
|
||||
if (card == NULL)
|
||||
return -ENOMEM;
|
||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
strcpy(card->driver, "MPU-401 UART");
|
||||
strcpy(card->shortname, card->driver);
|
||||
sprintf(card->longname, "%s at %#lx, ", card->shortname, port[dev]);
|
||||
|
||||
@@ -696,9 +696,9 @@ static int __devinit snd_mtpav_probe(struct platform_device *dev)
|
||||
int err;
|
||||
struct mtpav *mtp_card;
|
||||
|
||||
card = snd_card_new(index, id, THIS_MODULE, sizeof(*mtp_card));
|
||||
if (! card)
|
||||
return -ENOMEM;
|
||||
err = snd_card_create(index, id, THIS_MODULE, sizeof(*mtp_card), &card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
mtp_card = card->private_data;
|
||||
spin_lock_init(&mtp_card->spinlock);
|
||||
|
||||
@@ -957,10 +957,10 @@ static int __devinit snd_mts64_probe(struct platform_device *pdev)
|
||||
if ((err = snd_mts64_probe_port(p)) < 0)
|
||||
return err;
|
||||
|
||||
card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
|
||||
if (card == NULL) {
|
||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
|
||||
if (err < 0) {
|
||||
snd_printd("Cannot create card\n");
|
||||
return -ENOMEM;
|
||||
return err;
|
||||
}
|
||||
strcpy(card->driver, DRIVER_NAME);
|
||||
strcpy(card->shortname, "ESI " CARD_NAME);
|
||||
|
||||
@@ -98,9 +98,9 @@ static int __devinit snd_card_pcsp_probe(int devnum, struct device *dev)
|
||||
hrtimer_init(&pcsp_chip.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
pcsp_chip.timer.function = pcsp_do_timer;
|
||||
|
||||
card = snd_card_new(index, id, THIS_MODULE, 0);
|
||||
if (!card)
|
||||
return -ENOMEM;
|
||||
err = snd_card_create(index, id, THIS_MODULE, 0, &card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = snd_pcsp_create(card);
|
||||
if (err < 0) {
|
||||
|
||||
@@ -746,10 +746,10 @@ static int __devinit snd_portman_probe(struct platform_device *pdev)
|
||||
if ((err = snd_portman_probe_port(p)) < 0)
|
||||
return err;
|
||||
|
||||
card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
|
||||
if (card == NULL) {
|
||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
|
||||
if (err < 0) {
|
||||
snd_printd("Cannot create card\n");
|
||||
return -ENOMEM;
|
||||
return err;
|
||||
}
|
||||
strcpy(card->driver, DRIVER_NAME);
|
||||
strcpy(card->shortname, CARD_NAME);
|
||||
|
||||
@@ -936,9 +936,9 @@ static int __devinit snd_serial_probe(struct platform_device *devptr)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
|
||||
if (card == NULL)
|
||||
return -ENOMEM;
|
||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
strcpy(card->driver, "Serial");
|
||||
strcpy(card->shortname, "Serial MIDI (UART16550A)");
|
||||
|
||||
@@ -90,10 +90,10 @@ static int __devinit snd_virmidi_probe(struct platform_device *devptr)
|
||||
int idx, err;
|
||||
int dev = devptr->id;
|
||||
|
||||
card = snd_card_new(index[dev], id[dev], THIS_MODULE,
|
||||
sizeof(struct snd_card_virmidi));
|
||||
if (card == NULL)
|
||||
return -ENOMEM;
|
||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE,
|
||||
sizeof(struct snd_card_virmidi), &card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
vmidi = (struct snd_card_virmidi *)card->private_data;
|
||||
vmidi->card = card;
|
||||
|
||||
|
||||
+4
-3
@@ -636,9 +636,10 @@ au1000_init(void)
|
||||
struct snd_card *card;
|
||||
struct snd_au1000 *au1000;
|
||||
|
||||
card = snd_card_new(-1, "AC97", THIS_MODULE, sizeof(struct snd_au1000));
|
||||
if (card == NULL)
|
||||
return -ENOMEM;
|
||||
err = snd_card_create(-1, "AC97", THIS_MODULE,
|
||||
sizeof(struct snd_au1000), &card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
card->private_free = snd_au1000_free;
|
||||
au1000 = card->private_data;
|
||||
|
||||
+3
-3
@@ -878,9 +878,9 @@ static int __devinit hal2_probe(struct platform_device *pdev)
|
||||
struct snd_hal2 *chip;
|
||||
int err;
|
||||
|
||||
card = snd_card_new(index, id, THIS_MODULE, 0);
|
||||
if (card == NULL)
|
||||
return -ENOMEM;
|
||||
err = snd_card_create(index, id, THIS_MODULE, 0, &card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = hal2_create(card, &chip);
|
||||
if (err < 0) {
|
||||
|
||||
@@ -936,9 +936,9 @@ static int __devinit snd_sgio2audio_probe(struct platform_device *pdev)
|
||||
struct snd_sgio2audio *chip;
|
||||
int err;
|
||||
|
||||
card = snd_card_new(index, id, THIS_MODULE, 0);
|
||||
if (card == NULL)
|
||||
return -ENOMEM;
|
||||
err = snd_card_create(index, id, THIS_MODULE, 0, &card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = snd_sgio2audio_create(card, &chip);
|
||||
if (err < 0) {
|
||||
|
||||
@@ -975,9 +975,9 @@ snd_harmony_probe(struct parisc_device *padev)
|
||||
struct snd_card *card;
|
||||
struct snd_harmony *h;
|
||||
|
||||
card = snd_card_new(index, id, THIS_MODULE, 0);
|
||||
if (card == NULL)
|
||||
return -ENOMEM;
|
||||
err = snd_card_create(index, id, THIS_MODULE, 0, &card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = snd_harmony_create(card, padev, &h);
|
||||
if (err < 0)
|
||||
|
||||
@@ -91,7 +91,7 @@ static int snd_pdacf_dev_free(struct snd_device *device)
|
||||
*/
|
||||
static int snd_pdacf_probe(struct pcmcia_device *link)
|
||||
{
|
||||
int i;
|
||||
int i, err;
|
||||
struct snd_pdacf *pdacf;
|
||||
struct snd_card *card;
|
||||
static struct snd_device_ops ops = {
|
||||
@@ -112,10 +112,10 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
|
||||
return -ENODEV; /* disabled explicitly */
|
||||
|
||||
/* ok, create a card instance */
|
||||
card = snd_card_new(index[i], id[i], THIS_MODULE, 0);
|
||||
if (card == NULL) {
|
||||
err = snd_card_create(index[i], id[i], THIS_MODULE, 0, &card);
|
||||
if (err < 0) {
|
||||
snd_printk(KERN_ERR "pdacf: cannot create a card instance\n");
|
||||
return -ENOMEM;
|
||||
return err;
|
||||
}
|
||||
|
||||
pdacf = snd_pdacf_create(card);
|
||||
|
||||
@@ -292,7 +292,7 @@ static int vxpocket_probe(struct pcmcia_device *p_dev)
|
||||
{
|
||||
struct snd_card *card;
|
||||
struct snd_vxpocket *vxp;
|
||||
int i;
|
||||
int i, err;
|
||||
|
||||
/* find an empty slot from the card list */
|
||||
for (i = 0; i < SNDRV_CARDS; i++) {
|
||||
@@ -307,10 +307,10 @@ static int vxpocket_probe(struct pcmcia_device *p_dev)
|
||||
return -ENODEV; /* disabled explicitly */
|
||||
|
||||
/* ok, create a card instance */
|
||||
card = snd_card_new(index[i], id[i], THIS_MODULE, 0);
|
||||
if (card == NULL) {
|
||||
err = snd_card_create(index[i], id[i], THIS_MODULE, 0, &card);
|
||||
if (err < 0) {
|
||||
snd_printk(KERN_ERR "vxpocket: cannot create a card instance\n");
|
||||
return -ENOMEM;
|
||||
return err;
|
||||
}
|
||||
|
||||
vxp = snd_vxpocket_new(card, ibl[i], p_dev);
|
||||
|
||||
@@ -58,9 +58,9 @@ static int __init snd_pmac_probe(struct platform_device *devptr)
|
||||
char *name_ext;
|
||||
int err;
|
||||
|
||||
card = snd_card_new(index, id, THIS_MODULE, 0);
|
||||
if (card == NULL)
|
||||
return -ENOMEM;
|
||||
err = snd_card_create(index, id, THIS_MODULE, 0, &card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if ((err = snd_pmac_new(card, &chip)) < 0)
|
||||
goto __error;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user