[alsa-devel] [PATCH] ASoC: Don't crash on PM operations
Mark Brown
broonie at opensource.wolfsonmicro.com
Tue May 3 19:26:07 CEST 2011
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 at opensource.wolfsonmicro.com>
---
sound/soc/soc-core.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index a823654..f3833f4 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3365,6 +3365,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);
--
1.7.4.1
More information about the Alsa-devel
mailing list