From patchwork Sun Mar 8 10:57:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Mc Guire X-Patchwork-Id: 5961611 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 714C69F2A9 for ; Sun, 8 Mar 2015 11:01:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9F51F203B6 for ; Sun, 8 Mar 2015 11:01:45 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 3184220279 for ; Sun, 8 Mar 2015 11:01:44 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id C1F2B260476; Sun, 8 Mar 2015 12:01:42 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org 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 D4F6C260444; Sun, 8 Mar 2015 12:01:33 +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 40430260448; Sun, 8 Mar 2015 12:01:33 +0100 (CET) Received: from www.osadl.org (www.osadl.org [62.245.132.105]) by alsa0.perex.cz (Postfix) with ESMTP id 5573426043B for ; Sun, 8 Mar 2015 12:01:26 +0100 (CET) Received: from debian.hofrr.at (92-243-35-153.adsl.nanet.at [92.243.35.153] (may be forged)) by www.osadl.org (8.13.8/8.13.8/OSADL-2007092901) with ESMTP id t28B1Jdg013720; Sun, 8 Mar 2015 12:01:19 +0100 From: Nicholas Mc Guire To: Liam Girdwood Date: Sun, 8 Mar 2015 06:57:07 -0400 Message-Id: <1425812227-24172-1-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 1.7.10.4 Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen , Axel Lin , Takashi Iwai , Xiubo Li , Mark Brown , "Rafael J. Wysocki" , patches@opensource.wolfsonmicro.com, Tomi Valkeinen , Nicholas Mc Guire , Charles Keepax , linux-kernel@vger.kernel.org, abdoulaye berthe Subject: [alsa-devel] [PATCH] ASoC: wm5100: match wait_for_completion_timeout return type 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 return type of wait_for_completion_timeout is unsigned long not int. An appropriately named unsigned long is added and the assignment fixed up. Signed-off-by: Nicholas Mc Guire Acked-by: Charles Keepax --- This was only compile tested for exynos_defconfig + CONFIG_COMPILE_TEST=y, SND_SOC_ALL_CODECS=m (implies CONFIG_SND_SOC_WM5100=m) Patch is against 4.0-rc2 linux-next (localversion-next is -next-20150306) sound/soc/codecs/wm5100.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c index ea09db5..9674037 100644 --- a/sound/soc/codecs/wm5100.c +++ b/sound/soc/codecs/wm5100.c @@ -1762,6 +1762,7 @@ static int wm5100_set_fll(struct snd_soc_codec *codec, int fll_id, int source, struct _fll_div factors; struct wm5100_fll *fll; int ret, base, lock, i, timeout; + unsigned long time_left; switch (fll_id) { case WM5100_FLL1: @@ -1842,9 +1843,9 @@ static int wm5100_set_fll(struct snd_soc_codec *codec, int fll_id, int source, /* Poll for the lock; will use interrupt when we can test */ for (i = 0; i < timeout; i++) { if (i2c->irq) { - ret = wait_for_completion_timeout(&fll->lock, - msecs_to_jiffies(25)); - if (ret > 0) + time_left = wait_for_completion_timeout(&fll->lock, + msecs_to_jiffies(25)); + if (time_left > 0) break; } else { msleep(1);