Message ID | 1416513940-28717-1-git-send-email-lars@metafoo.de (mailing list archive) |
---|---|
State | Accepted |
Commit | ceb3c0683cfc5dcc2b627985143105f6dfb0b324 |
Headers | show |
> On Nov 21, 2014, at 05:05, Lars-Peter Clausen <lars@metafoo.de> wrote: > > The codec field of the snd_soc_widget struct is eventually going to be > removed, use snd_soc_dapm_to_codec(w->dapm) instead. > > Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> > --- For both Acked-by: Brian Austin <brian.austin@cirrus.com> Thanks
On Thu, Nov 20, 2014 at 09:05:38PM +0100, Lars-Peter Clausen wrote: > The codec field of the snd_soc_widget struct is eventually going to be > removed, use snd_soc_dapm_to_codec(w->dapm) instead. Applied, thanks.
diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c index 669c38f..b395152 100644 --- a/sound/soc/codecs/cs42l51.c +++ b/sound/soc/codecs/cs42l51.c @@ -153,15 +153,17 @@ static const struct snd_kcontrol_new cs42l51_snd_controls[] = { static int cs42l51_pdn_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { + struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); + switch (event) { case SND_SOC_DAPM_PRE_PMD: - snd_soc_update_bits(w->codec, CS42L51_POWER_CTL1, + snd_soc_update_bits(codec, CS42L51_POWER_CTL1, CS42L51_POWER_CTL1_PDN, CS42L51_POWER_CTL1_PDN); break; default: case SND_SOC_DAPM_POST_PMD: - snd_soc_update_bits(w->codec, CS42L51_POWER_CTL1, + snd_soc_update_bits(codec, CS42L51_POWER_CTL1, CS42L51_POWER_CTL1_PDN, 0); break; }
The codec field of the snd_soc_widget struct is eventually going to be removed, use snd_soc_dapm_to_codec(w->dapm) instead. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> --- sound/soc/codecs/cs42l51.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)