summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorNicolin Chen <b42378@freescale.com>2013-09-10 17:25:52 +0800
committerJason Liu <r64343@freescale.com>2013-10-30 09:55:35 +0800
commit2bf463e4cb92aec1a7b79352f84e78cd3ab2abcb (patch)
tree8e2b47c4a138649532d686a3f5a33af525452620 /sound
parentee15d698b5fb568a5f4fe5a53036e3b84e460d53 (diff)
ENGR00278967 ASoC: fsl: Fix null pointer when rmmod snd-soc-imx-hdmi
When rmmod snd-soc-imx-hdmi if loadable module feature of HDMI audio is being used, there would be a kernel dump promt: Unable to handle kernel NULL pointer dereference at virtual address This was caused by inappropriate priv pointer fetching, thus fix it. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/fsl/imx-hdmi-dma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/fsl/imx-hdmi-dma.c b/sound/soc/fsl/imx-hdmi-dma.c
index 372f48c2951c..b76bd79c8cfa 100644
--- a/sound/soc/fsl/imx-hdmi-dma.c
+++ b/sound/soc/fsl/imx-hdmi-dma.c
@@ -1002,8 +1002,8 @@ static void imx_hdmi_dma_pcm_free(struct snd_pcm *pcm)
{
int stream = SNDRV_PCM_STREAM_PLAYBACK;
struct snd_pcm_substream *substream = pcm->streams[stream].substream;
- struct snd_pcm_runtime *runtime = substream->runtime;
- struct hdmi_dma_priv *priv = runtime->private_data;
+ struct snd_soc_pcm_runtime *rtd = pcm->private_data;
+ struct hdmi_dma_priv *priv = dev_get_drvdata(rtd->platform->dev);
if (substream) {
snd_dma_free_pages(&substream->dma_buffer);