From patchwork Thu Feb 13 13:14:21 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: 3645291 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B11E9BF13A for ; Thu, 13 Feb 2014 13:14:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D7A78201D5 for ; Thu, 13 Feb 2014 13:14:40 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id ACBCB20115 for ; Thu, 13 Feb 2014 13:14:39 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 2687B2651DA; Thu, 13 Feb 2014 14:14:36 +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, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 746EB261987; Thu, 13 Feb 2014 14:14:26 +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 43F5E261987; Thu, 13 Feb 2014 14:14:25 +0100 (CET) Received: from smtp-out-003.synserver.de (smtp-out-190.synserver.de [212.40.185.190]) by alsa0.perex.cz (Postfix) with ESMTP id 5154026172D for ; Thu, 13 Feb 2014 14:14:18 +0100 (CET) Received: (qmail 32134 invoked by uid 0); 13 Feb 2014 13:14:11 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 31967 Received: from p4fe60d2c.dip0.t-ipconnect.de (HELO lars-adi-laptop.analog.com) [79.230.13.44] by 217.119.54.77 with SMTP; 13 Feb 2014 13:14:11 -0000 From: Lars-Peter Clausen To: Mark Brown , Liam Girdwood Date: Thu, 13 Feb 2014 14:14:21 +0100 Message-Id: <1392297261-1366-1-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 1.8.0 Cc: Arun Shamanna Lakshmi , alsa-devel@alsa-project.org, Lars-Peter Clausen Subject: [alsa-devel] [PATCH] ASoC: dapm: Consistently use unsigned int for register values 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 Commit f7d3c1709 ("ASoC: dapm: Change prototype of soc_widget_read") changed the signature of soc_widget_read() so that it, instead of return the register value as a int, takes a pointer to a unsigned int and stores the register value in that pointer. There are still a few places that pass a int type value to that function though. Change these to unsigned int. For more consistency also change the signature of soc_widget_write() to take a unsigned int instead of an int for the register value. Signed-off-by: Lars-Peter Clausen --- sound/soc/soc-dapm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index dc8ff13..2c2d751 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -386,7 +386,8 @@ static int soc_widget_read(struct snd_soc_dapm_widget *w, int reg, return -1; } -static int soc_widget_write(struct snd_soc_dapm_widget *w, int reg, int val) +static int soc_widget_write(struct snd_soc_dapm_widget *w, int reg, + unsigned int val) { if (w->codec) return snd_soc_write(w->codec, reg, val); @@ -506,7 +507,7 @@ static void dapm_set_path_status(struct snd_soc_dapm_widget *w, case snd_soc_dapm_switch: case snd_soc_dapm_mixer: case snd_soc_dapm_mixer_named_ctl: { - int val; + unsigned int val; struct soc_mixer_control *mc = (struct soc_mixer_control *) w->kcontrol_news[i].private_value; int reg = mc->reg; @@ -530,7 +531,7 @@ static void dapm_set_path_status(struct snd_soc_dapm_widget *w, case snd_soc_dapm_mux: { struct soc_enum *e = (struct soc_enum *) w->kcontrol_news[i].private_value; - int val, item; + unsigned int val, item; soc_widget_read(w, e->reg, &val); item = (val >> e->shift_l) & e->mask; @@ -559,7 +560,7 @@ static void dapm_set_path_status(struct snd_soc_dapm_widget *w, case snd_soc_dapm_value_mux: { struct soc_enum *e = (struct soc_enum *) w->kcontrol_news[i].private_value; - int val, item; + unsigned int val, item; soc_widget_read(w, e->reg, &val); val = (val >> e->shift_l) & e->mask;