ASoC: fsl: imx-spdif: Set the card owner field
authorFabio Estevam <fabio.estevam@freescale.com>
Wed, 14 Jan 2015 18:39:15 +0000 (16:39 -0200)
committerMark Brown <broonie@kernel.org>
Wed, 14 Jan 2015 18:48:54 +0000 (18:48 +0000)
Set the card owner field to avoid getting a kernel crash when the imx-spdif
is unloaded while the playback is active.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/imx-spdif.c

index e94704f1b9ee52ed5dcea4006c6321ff30e26a6b..33da26a1245718f4b6e814bb22e04218ecc340fc 100644 (file)
@@ -60,6 +60,7 @@ static int imx_spdif_audio_probe(struct platform_device *pdev)
        data->card.dev = &pdev->dev;
        data->card.dai_link = &data->dai;
        data->card.num_links = 1;
+       data->card.owner = THIS_MODULE;
 
        ret = snd_soc_of_parse_card_name(&data->card, "model");
        if (ret)