ALSA: sh: Convert to snd_card_new() with a device pointer
authorTakashi Iwai <tiwai@suse.de>
Wed, 29 Jan 2014 13:40:03 +0000 (14:40 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 14 Feb 2014 07:14:07 +0000 (08:14 +0100)
Also remove superfluous snd_card_set_dev() calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/sh/aica.c
sound/sh/sh_dac_audio.c

index 78a369785a9ecf3b3e8d1a72e6b536e6a8ddb89a..47849eaf266d5c1e2ba17ddd50edf4dda6381d92 100644 (file)
@@ -608,8 +608,8 @@ static int snd_aica_probe(struct platform_device *devptr)
        dreamcastcard = kmalloc(sizeof(struct snd_card_aica), GFP_KERNEL);
        if (unlikely(!dreamcastcard))
                return -ENOMEM;
-       err = snd_card_create(index, SND_AICA_DRIVER, THIS_MODULE, 0,
-                             &dreamcastcard->card);
+       err = snd_card_new(&devptr->dev, index, SND_AICA_DRIVER,
+                          THIS_MODULE, 0, &dreamcastcard->card);
        if (unlikely(err < 0)) {
                kfree(dreamcastcard);
                return err;
@@ -624,7 +624,6 @@ static int snd_aica_probe(struct platform_device *devptr)
        err = snd_aicapcmchip(dreamcastcard, 0);
        if (unlikely(err < 0))
                goto freedreamcast;
-       snd_card_set_dev(dreamcastcard->card, &devptr->dev);
        dreamcastcard->timer.data = 0;
        dreamcastcard->channel = NULL;
        /* Add basic controls */
index 7c9422c4fc0f99097c0b3b6197a1dc0ff8165099..d1fb74dabbd11f4fd8019cf79c7ca9c3749c2f88 100644 (file)
@@ -396,7 +396,7 @@ static int snd_sh_dac_probe(struct platform_device *devptr)
        struct snd_card *card;
        int err;
 
-       err = snd_card_create(index, id, THIS_MODULE, 0, &card);
+       err = snd_card_new(&devptr->dev, index, id, THIS_MODULE, 0, &card);
        if (err < 0) {
                        snd_printk(KERN_ERR "cannot allocate the card\n");
                        return err;