提交 0fa63b69 编写于 作者: M Manjunathappa, Prakash 提交者: Mark Brown

ASoC: DaVinci: fix kernel panic due to uninitialized platform_data

This patch fixes the Kernel panic issue on accessing davinci_vc in
cq93vc_probe function. struct davinci_vc is part of platform device's
private driver data(codec->dev->p->driver_data) and this is populated
by DaVinci Voice Codec MFD driver.
Signed-off-by: NManjunathappa, Prakash <prakash.pm@ti.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 c73e0c83
...@@ -153,7 +153,7 @@ static int cq93vc_resume(struct snd_soc_codec *codec) ...@@ -153,7 +153,7 @@ static int cq93vc_resume(struct snd_soc_codec *codec)
static int cq93vc_probe(struct snd_soc_codec *codec) static int cq93vc_probe(struct snd_soc_codec *codec)
{ {
struct davinci_vc *davinci_vc = codec->dev->platform_data; struct davinci_vc *davinci_vc = snd_soc_codec_get_drvdata(codec);
davinci_vc->cq93vc.codec = codec; davinci_vc->cq93vc.codec = codec;
codec->control_data = davinci_vc; codec->control_data = davinci_vc;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册