From: Mark Brown Date: Tue, 3 May 2011 17:25:34 +0000 (+0100) Subject: ASoC: Don't crash on PM operations X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ed77cc122a8402db8f9c3492649aa0c3fee7b385;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git ASoC: Don't crash on PM operations The move over to exposing snd_soc_register_card() let the initialisation of the driver data we use to find the card in PM operations go AWOL. Fix this by setting the driver data when we register the card. Signed-off-by: Mark Brown Acked-by: Liam Girdwood --- diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index d8562ce4de7a..dd55d1069468 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3291,6 +3291,8 @@ int snd_soc_register_card(struct snd_soc_card *card) if (!card->name || !card->dev) return -EINVAL; + dev_set_drvdata(card->dev, card); + snd_soc_initialize_card_lists(card); soc_init_card_debugfs(card);