From patchwork Tue Mar 13 09:07:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Thomson X-Patchwork-Id: 10277979 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D40F06038F for ; Tue, 13 Mar 2018 09:08:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D2745286A8 for ; Tue, 13 Mar 2018 09:08:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C75B228732; Tue, 13 Mar 2018 09:08:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=0.6 required=2.0 tests=BAYES_00,FROM_WORDY, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E556E286A8 for ; Tue, 13 Mar 2018 09:08:05 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 2A4E8267174; Tue, 13 Mar 2018 10:08:04 +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 0AD5926718B; Tue, 13 Mar 2018 10:08:02 +0100 (CET) Received: from mail1.bemta5.messagelabs.com (mail1.bemta5.messagelabs.com [195.245.231.145]) by alsa0.perex.cz (Postfix) with ESMTP id 86B6D267144 for ; Tue, 13 Mar 2018 10:07:58 +0100 (CET) Received: from [85.158.139.19] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-9.bemta-5.messagelabs.com id 52/31-03937-DE497AA5; Tue, 13 Mar 2018 09:07:57 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrNIsWRWlGSWpSXmKPExsUSt3Opse7bKcu jDA6tkbW4cvEQk8XUh0/YLL5d6WCyuLxrDptF565+VosN39cyOrB5bPjcxOaxc9Zddo9NqzrZ PPa9XcbmsX7LVRaPz5vkAtiiWDPzkvIrElgzfn+dzlJwjqPi6/+jLA2MO9m7GLk4hATWM0r0N p5g62LkBHIqJG5efwxmswlYSEw+8QDMZhFQlXjV8pIdxBYW8JU4/XAOG0iziEAXo8TqV4/BEs wC5RJbPk1kBrF5BRwkej5MYIOwBSVOznzCAlEjIXHwxQtmiGUGEqcXNILFJQTsJaa/vwoU5wC y9SUaj8VChA0lvs/6BlViLrFjTy/TBEb+WUimzkIydQEj0ypGjeLUorLUIl1DQ72kosz0jJLc xMwcXUMDU73c1OLixPTUnMSkYr3k/NxNjMCAZgCCHYwr250PMUpyMCmJ8hqGLo8S4kvKT6nMS CzOiC8qzUktPsQow8GhJMF7bTJQTrAoNT21Ii0zBxhbMGkJDh4lEd6HIGne4oLE3OLMdIjUKU ZdjhsvXrcxC7Hk5eelSonzfgMpEgApyijNgxsBi/NLjLJSwryMQEcJ8RSkFuVmlqDKv2IU52B UEuY9CjKFJzOvBG7TK6AjmICOuHJiCcgRJYkIKakGRldu/o6VNZIX3iidijF5mLZ6x8rDTN/E r4bkb993cfuJjGUpPyPm6+e2WQcmPxN64BKplc+e9p/lPcfb6jX+S313fnCrTTb6stlP6GNRw Blu8a5pOhOf5iZZCcqeEj8vYLjEYbHiljMy5ftKj7v1skjnpJ8Kb1cJ3W7INvmSdJJuzeR1qb 8uK7EUZyQaajEXFScCAPcgpDHuAgAA X-Env-Sender: Adam.Thomson.Opensource@diasemi.com X-Msg-Ref: server-11.tower-178.messagelabs.com!1520932075!98642228!1 X-Originating-IP: [94.185.165.51] X-SYMC-ESS-Client-Auth: outbound-route-from=pass X-StarScan-Received: X-StarScan-Version: 9.9.15; banners=-,-,- X-VirusChecked: Checked Received: (qmail 10538 invoked from network); 13 Mar 2018 09:07:56 -0000 Received: from mailrelay2.diasemi.com (HELO sw-ex-cashub01.diasemi.com) (94.185.165.51) by server-11.tower-178.messagelabs.com with AES128-SHA encrypted SMTP; 13 Mar 2018 09:07:56 -0000 Received: from swsrvapps-01.diasemi.com (10.20.28.141) by SW-EX-CASHUB01.diasemi.com (10.20.16.140) with Microsoft SMTP Server id 14.3.382.0; Tue, 13 Mar 2018 09:07:54 +0000 Received: by swsrvapps-01.diasemi.com (Postfix, from userid 22379) id 030AA3FBD3; Tue, 13 Mar 2018 09:07:54 +0000 (GMT) From: Adam Thomson Date: Tue, 13 Mar 2018 09:07:54 +0000 To: Mark Brown , Liam Girdwood , Jaroslav Kysela , Takashi Iwai Message-ID: <20180313090755.030AA3FBD3@swsrvapps-01.diasemi.com> MIME-Version: 1.0 X-KSE-AttachmentFiltering-Interceptor-Info: protection disabled X-KSE-ServerInfo: sw-ex-cashub01.diasemi.com, 9 X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 13/03/2018 08:13:00 Cc: alsa-devel@alsa-project.org, Support Opensource , linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH] ASoC: da7219: clkdev_drop usage depends on CONFIG_COMMON_CLK 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 Fixes: ASoC: da7219: Add common clock usage for providing DAI clks clkdev_drop usage in the codec remove function should be dependent on if CONFIG_COMMON_CLK is defined for the platform, otherwise it can cause build failures for platforms that do not support this. The clkdev_* functions are still defined for those platforms, in headers and source but the functions are not linked in. This patch resolves this issue, so clkdev_drop is only used if CONFIG_COMMON_CLK is defined. Signed-off-by: Adam Thomson --- sound/soc/codecs/da7219.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c index 4412159..08f55d7 100644 --- a/sound/soc/codecs/da7219.c +++ b/sound/soc/codecs/da7219.c @@ -1966,8 +1966,10 @@ static void da7219_remove(struct snd_soc_component *component) da7219_aad_exit(component); +#ifdef CONFIG_COMMON_CLK if (da7219->dai_clks_lookup) clkdev_drop(da7219->dai_clks_lookup); +#endif /* Supplies */ regulator_bulk_disable(DA7219_NUM_SUPPLIES, da7219->supplies);