From patchwork Thu Nov 20 20:05:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 5350591 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DB0959F1E1 for ; Thu, 20 Nov 2014 20:06:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1CF1A201EF for ; Thu, 20 Nov 2014 20:06:01 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 01875201B4 for ; Thu, 20 Nov 2014 20:06:00 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id E3CDA265A81; Thu, 20 Nov 2014 21:05:57 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, SUBJ_OBFU_PUNCT_MANY, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 0FB7E2605FF; Thu, 20 Nov 2014 21:05:50 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id EDBC1260610; Thu, 20 Nov 2014 21:05:48 +0100 (CET) Received: from smtp-out-076.synserver.de (smtp-out-076.synserver.de [212.40.185.76]) by alsa0.perex.cz (Postfix) with ESMTP id BB4192605F4 for ; Thu, 20 Nov 2014 21:05:40 +0100 (CET) Received: (qmail 12717 invoked by uid 0); 20 Nov 2014 20:05:39 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 12617 Received: from ppp-212-114-236-115.dynamic.mnet-online.de (HELO lars-adi-laptop.fritz.box) [212.114.236.115] by 217.119.54.73 with SMTP; 20 Nov 2014 20:05:39 -0000 From: Lars-Peter Clausen To: Mark Brown , Liam Girdwood Date: Thu, 20 Nov 2014 21:05:38 +0100 Message-Id: <1416513940-28717-1-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 1.8.0 Cc: Brian Austin , Lars-Peter Clausen , alsa-devel@alsa-project.org, Paul Handrigan Subject: [alsa-devel] [PATCH 1/2] ASoC: cs42l51: Replace w->codec snd_soc_dapm_to_codec(w->dapm) X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Brian Austin --- sound/soc/codecs/cs42l51.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; }