mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04: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 <[email protected]>
This commit is contained in:
parent
e58de7baf7
commit
bd7dd77c2a
31 changed files with 111 additions and 103 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue