提交 a5ccea22 编写于 作者: M Mark Brown

ASoC: wm2000: Get the CODEC pointer from the widget

Don't rely on the kcontrol for robustness reasons, the widget mechanism
is what the framework uses.
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 f4a75d2e
...@@ -646,7 +646,7 @@ static const struct snd_kcontrol_new wm2000_controls[] = { ...@@ -646,7 +646,7 @@ static const struct snd_kcontrol_new wm2000_controls[] = {
static int wm2000_anc_power_event(struct snd_soc_dapm_widget *w, static int wm2000_anc_power_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event) struct snd_kcontrol *kcontrol, int event)
{ {
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); struct snd_soc_codec *codec = w->codec;
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev); struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
if (SND_SOC_DAPM_EVENT_ON(event)) if (SND_SOC_DAPM_EVENT_ON(event))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册