Commit ed77cc12 authored by Mark Brown's avatar Mark Brown

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
parent 005967a1
...@@ -3291,6 +3291,8 @@ int snd_soc_register_card(struct snd_soc_card *card) ...@@ -3291,6 +3291,8 @@ int snd_soc_register_card(struct snd_soc_card *card)
if (!card->name || !card->dev) if (!card->name || !card->dev)
return -EINVAL; return -EINVAL;
dev_set_drvdata(card->dev, card);
snd_soc_initialize_card_lists(card); snd_soc_initialize_card_lists(card);
soc_init_card_debugfs(card); soc_init_card_debugfs(card);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment