From patchwork Mon Sep 8 11:14:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 4862911 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 AB28BC0338 for ; Mon, 8 Sep 2014 14:20:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8BC7C20108 for ; Mon, 8 Sep 2014 14:20:31 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id DFC9920125 for ; Mon, 8 Sep 2014 14:20:29 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 44DB3261A5E; Mon, 8 Sep 2014 16:20:28 +0200 (CEST) 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,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 0E4C526549C; Mon, 8 Sep 2014 15:39:59 +0200 (CEST) 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 50F4026549C; Mon, 8 Sep 2014 15:39:57 +0200 (CEST) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) by alsa0.perex.cz (Postfix) with ESMTP id 0C441266A5F for ; Mon, 8 Sep 2014 13:14:16 +0200 (CEST) Received: from wuerfel.localnet (HSI-KBW-134-3-133-35.hsi14.kabel-badenwuerttemberg.de [134.3.133.35]) by mrelayeu.kundenserver.de (node=mreue101) with ESMTP (Nemesis) id 0LrsLe-1YNkII3q98-013h8o; Mon, 08 Sep 2014 13:14:09 +0200 From: Arnd Bergmann To: Mark Brown Date: Mon, 08 Sep 2014 13:14:05 +0200 Message-ID: <42811667.3TM1iBfezH@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V02:K0:hOxqPYM6WWU7Qb0992kXxjhhHhhhoQHt/PMQlUNHrBW KzmCBYic2OO+pS1awpfQW6GTgtOU76wjydlokt6ykdb3ChOFL3 e9Fg+0e5gBhA6s1fbin10DhYoRlk3/vi0VgajpwEuPcRaP60sX /aoF3am+VyOsqiUAhcCSzuLYm618K6IobFLdR0o+yno4nnvwn5 151qbUoYYIiFF/4QlkXAXmPudLXGbz4eNsDjSzZQ8cSANIWZ7P 5SACN+i/oSal82o9gmv+9gnNrwYP2Eft3ZGdB/4sfg86E97Zsg lI07bI2xBTYKWJu076qXTlvUCsBgADSdPhMjoV6GXdz8ShiXbZ +IUxKwqNGditAIFY/Qgw= X-UI-Out-Filterresults: notjunk:1; Cc: Jean-Francois Moine , alsa-devel@alsa-project.org, Liam Girdwood , linux-arm-kernel@lists.infradead.org, Kuninori Morimoto Subject: [alsa-devel] [PATCH] ASoC: simple-card: fix regression in clock rate lookup 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 7c7b9cf53d284f ("ASoC: simple-card: fixup cpu_dai_name clear case") changed the way that "sound-dai" properties are handled, which leads to the clock frequency not being picked up from the node that the phandle points to, as correctly identified by gcc with this warning: sound/soc/generic/simple-card.c: In function 'asoc_simple_card_sub_parse_of': sound/soc/generic/simple-card.c:165:7: warning: 'node' may be used uninitialized in this function [-Wmaybe-uninitialized] This restores the previous behavior by using the node from of_parse_phandle_with_args() that was previously being returned from of_parse_phandle(). Signed-off-by: Arnd Bergmann diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index b563850c43f4..a0440bd533d5 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -116,7 +116,6 @@ asoc_simple_card_sub_parse_of(struct device_node *np, int *args_count) { struct of_phandle_args args; - struct device_node *node; struct clk *clk; u32 val; int ret; @@ -162,7 +161,7 @@ asoc_simple_card_sub_parse_of(struct device_node *np, } else if (!of_property_read_u32(np, "system-clock-frequency", &val)) { dai->sysclk = val; } else { - clk = of_clk_get(node, 0); + clk = of_clk_get(args.np, 0); if (!IS_ERR(clk)) dai->sysclk = clk_get_rate(clk); }