aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-05-03 13:25:34 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-05-03 18:28:04 -0400
commited77cc122a8402db8f9c3492649aa0c3fee7b385 (patch)
tree6223f0d61de0f406c1453d6a063196512dd3c2a6
parent005967a1df80980acb47c72d758ec05059105492 (diff)
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 <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
-rw-r--r--sound/soc/soc-core.c2
1 files changed, 2 insertions, 0 deletions
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)
3291 if (!card->name || !card->dev) 3291 if (!card->name || !card->dev)
3292 return -EINVAL; 3292 return -EINVAL;
3293 3293
3294 dev_set_drvdata(card->dev, card);
3295
3294 snd_soc_initialize_card_lists(card); 3296 snd_soc_initialize_card_lists(card);
3295 3297
3296 soc_init_card_debugfs(card); 3298 soc_init_card_debugfs(card);