drivers/media: Convert to snd_card_create()
authorTakashi Iwai <tiwai@suse.de>
Mon, 12 Jan 2009 14:17:09 +0000 (15:17 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 12 Jan 2009 14:25:01 +0000 (15:25 +0100)
Convert from snd_card_new() to the new snd_card_create() function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
drivers/media/video/cx88/cx88-alsa.c
drivers/media/video/em28xx/em28xx-audio.c
drivers/media/video/saa7134/saa7134-alsa.c

index 66c755c116dcbc8190f7305257b8201e6bc88496..ce98d955231ae4f505b8e018836698d33a3ebde8 100644 (file)
@@ -803,9 +803,10 @@ static int __devinit cx88_audio_initdev(struct pci_dev *pci,
                return (-ENOENT);
        }
 
-       card = snd_card_new(index[devno], id[devno], THIS_MODULE, sizeof(snd_cx88_card_t));
-       if (!card)
-               return (-ENOMEM);
+       err = snd_card_create(index[devno], id[devno], THIS_MODULE,
+                             sizeof(snd_cx88_card_t), &card);
+       if (err < 0)
+               return err;
 
        card->private_free = snd_cx88_dev_free;
 
index 94378ccb7505845d157920e4f81d9154eee6f35f..66579508e17569e92dd68de337dff1fd4b38f741 100644 (file)
@@ -438,9 +438,10 @@ static int em28xx_audio_init(struct em28xx *dev)
        printk(KERN_INFO "em28xx-audio.c: Copyright (C) 2006 Markus "
                         "Rechberger\n");
 
-       card = snd_card_new(index[devnr], "Em28xx Audio", THIS_MODULE, 0);
-       if (card == NULL)
-               return -ENOMEM;
+       err = snd_card_create(index[devnr], "Em28xx Audio", THIS_MODULE, 0,
+                             &card);
+       if (err < 0)
+               return err;
 
        spin_lock_init(&adev->slock);
        err = snd_pcm_new(card, "Em28xx Audio", 0, 0, 1, &pcm);
index 26194a0ce927c4e414c66c89dbabf29d8a00fdbd..482be1436e9262cb0511da8a3d07bb5232147d0d 100644 (file)
@@ -990,10 +990,10 @@ static int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum)
        if (!enable[devnum])
                return -ENODEV;
 
-       card = snd_card_new(index[devnum], id[devnum], THIS_MODULE, sizeof(snd_card_saa7134_t));
-
-       if (card == NULL)
-               return -ENOMEM;
+       err = snd_card_create(index[devnum], id[devnum], THIS_MODULE,
+                             sizeof(snd_card_saa7134_t), &card);
+       if (err < 0)
+               return err;
 
        strcpy(card->driver, "SAA7134");