[alsa-devel] [PATCH] 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 --- 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);
On Tue, 2011-05-03 at 18:26 +0100, Mark Brown wrote:
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
sound/soc/soc-core.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
Acked-by: Liam Girdwood lrg@ti.com
participants (2)
-
Liam Girdwood
-
Mark Brown