Skip to content

Commit

Permalink
ASoC: Don't crash on PM operations
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed May 3, 2011
1 parent 005967a commit ed77cc1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit ed77cc1

Please sign in to comment.