ASoC: core: Convert to snd_card_new() with a device pointer
authorTakashi Iwai <tiwai@suse.de>
Wed, 29 Jan 2014 13:42:55 +0000 (14:42 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 14 Feb 2014 07:14:08 +0000 (08:14 +0100)
Also remove superfluous card->dev assignment.

Reviewed-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/soc/soc-core.c

index fe1df50805a3035ea455d40771c55d4cb4f6585d..135ddb01aadb0a428a5783ef84089b46a0a1e2c5 100644 (file)
@@ -1654,7 +1654,7 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
        }
 
        /* card bind complete so register a sound card */
-       ret = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
+       ret = snd_card_new(card->dev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
                        card->owner, 0, &card->snd_card);
        if (ret < 0) {
                dev_err(card->dev,
@@ -1662,7 +1662,6 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
                        card->name, ret);
                goto base_error;
        }
-       card->snd_card->dev = card->dev;
 
        card->dapm.bias_level = SND_SOC_BIAS_OFF;
        card->dapm.dev = card->dev;