[18/24] ASoC: core: Convert to snd_card_new() with a device pointer
diff mbox

Message ID 1392201340-27113-19-git-send-email-tiwai@suse.de
State Accepted
Delegated to: Takashi Iwai
Headers show

Commit Message

Takashi Iwai Feb. 12, 2014, 10:35 a.m. UTC
Also remove superfluous card->dev assignment.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/soc/soc-core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Mark Brown Feb. 12, 2014, 1:04 p.m. UTC | #1
On Wed, Feb 12, 2014 at 11:35:34AM +0100, Takashi Iwai wrote:
> Also remove superfluous card->dev assignment.

Reviewed-by: Mark Brown <broonie@linaro.org>
Takashi Iwai Feb. 12, 2014, 1:10 p.m. UTC | #2
At Wed, 12 Feb 2014 13:04:07 +0000,
Mark Brown wrote:
> 
> On Wed, Feb 12, 2014 at 11:35:34AM +0100, Takashi Iwai wrote:
> > Also remove superfluous card->dev assignment.
> 
> Reviewed-by: Mark Brown <broonie@linaro.org>

Thanks, added the tag.

I pushed the latest patches in topic/snd-card-dev branch of sound git
tree.


Takashi

Patch
diff mbox

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index fe1df50805a3..135ddb01aadb 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -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;