From 5bc6557674611923916d7f02beec502fae087ae6 Mon Sep 17 00:00:00 2001 From: Zidan Wang Date: Wed, 20 Jan 2016 09:50:40 +0800 Subject: MLK-12244 ASoC: fsl: Set the sound card owner field When load sound card, the pulseaudio will using the sound card to playback and record. It may be cause a kernel crash when the sound card is unloaded while the playback/record is active After setting the sound card owner field, when pulseaudio is running, the sound card module ref-count will not be 0 and the sound card will not be unloaded. So you should stop the pulseaudio when you want to unload the sound card. Signed-off-by: Zidan Wang [ Aisheng: hdmi change merged into hdmi branch ] Signed-off-by: Dong Aisheng --- sound/soc/fsl/imx-sii902x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound/soc/fsl/imx-sii902x.c') diff --git a/sound/soc/fsl/imx-sii902x.c b/sound/soc/fsl/imx-sii902x.c index 7cd19faa8617..f66ecf59c016 100644 --- a/sound/soc/fsl/imx-sii902x.c +++ b/sound/soc/fsl/imx-sii902x.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 Freescale Semiconductor, Inc. + * Copyright (C) 2015-2016 Freescale Semiconductor, Inc. * * The code contained herein is licensed under the GNU General Public * License. You may obtain a copy of the GNU General Public License @@ -225,6 +225,7 @@ static int imx_sii902x_probe(struct platform_device *pdev) SND_SOC_DAIFMT_CBS_CFS; data->card.dev = &pdev->dev; + data->card.owner = THIS_MODULE; ret = snd_soc_of_parse_card_name(&data->card, "model"); if (ret) goto fail; -- cgit v1.2.3