Commit 758021bf authored by Takashi Iwai's avatar Takashi Iwai

drivers/media: Convert to snd_card_create()

Convert from snd_card_new() to the new snd_card_create() function.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 2fa51107
...@@ -803,9 +803,10 @@ static int __devinit cx88_audio_initdev(struct pci_dev *pci, ...@@ -803,9 +803,10 @@ static int __devinit cx88_audio_initdev(struct pci_dev *pci,
return (-ENOENT); return (-ENOENT);
} }
card = snd_card_new(index[devno], id[devno], THIS_MODULE, sizeof(snd_cx88_card_t)); err = snd_card_create(index[devno], id[devno], THIS_MODULE,
if (!card) sizeof(snd_cx88_card_t), &card);
return (-ENOMEM); if (err < 0)
return err;
card->private_free = snd_cx88_dev_free; card->private_free = snd_cx88_dev_free;
......
...@@ -438,9 +438,10 @@ static int em28xx_audio_init(struct em28xx *dev) ...@@ -438,9 +438,10 @@ static int em28xx_audio_init(struct em28xx *dev)
printk(KERN_INFO "em28xx-audio.c: Copyright (C) 2006 Markus " printk(KERN_INFO "em28xx-audio.c: Copyright (C) 2006 Markus "
"Rechberger\n"); "Rechberger\n");
card = snd_card_new(index[devnr], "Em28xx Audio", THIS_MODULE, 0); err = snd_card_create(index[devnr], "Em28xx Audio", THIS_MODULE, 0,
if (card == NULL) &card);
return -ENOMEM; if (err < 0)
return err;
spin_lock_init(&adev->slock); spin_lock_init(&adev->slock);
err = snd_pcm_new(card, "Em28xx Audio", 0, 0, 1, &pcm); err = snd_pcm_new(card, "Em28xx Audio", 0, 0, 1, &pcm);
......
...@@ -990,10 +990,10 @@ static int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum) ...@@ -990,10 +990,10 @@ static int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum)
if (!enable[devnum]) if (!enable[devnum])
return -ENODEV; return -ENODEV;
card = snd_card_new(index[devnum], id[devnum], THIS_MODULE, sizeof(snd_card_saa7134_t)); err = snd_card_create(index[devnum], id[devnum], THIS_MODULE,
sizeof(snd_card_saa7134_t), &card);
if (card == NULL) if (err < 0)
return -ENOMEM; return err;
strcpy(card->driver, "SAA7134"); strcpy(card->driver, "SAA7134");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment