Skip to contentSkip to conversation

ASoC: Don't crash on PM operations

PATCH In review Mark Brown 2 participants 2 messages May 3, 2011

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 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.

---
 sound/soc/soc-core.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
sound/soc/soc-core.c +2 -0
index a823654..f3833f4 100644
@@ -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);
Signature · 1 line
1.7.4.1
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Mark Brown

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.

---
 sound/soc/soc-core.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)