From patchwork Sun Mar 8 21:05:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 5963031 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 023C6BF440 for ; Sun, 8 Mar 2015 21:06:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3410320254 for ; Sun, 8 Mar 2015 21:05:59 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 447D720251 for ; Sun, 8 Mar 2015 21:05:57 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 9D817260580; Sun, 8 Mar 2015 22:05:55 +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,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 05B9E26055A; Sun, 8 Mar 2015 22:05:47 +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 54757260565; Sun, 8 Mar 2015 22:05:46 +0100 (CET) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.13]) by alsa0.perex.cz (Postfix) with ESMTP id 6311426054D for ; Sun, 8 Mar 2015 22:05:39 +0100 (CET) Received: from wuerfel.localnet ([149.172.15.242]) by mrelayeu.kundenserver.de (mreue102) with ESMTPSA (Nemesis) id 0MFcG5-1YGdtw0aF3-00Egae; Sun, 08 Mar 2015 22:05:33 +0100 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Date: Sun, 08 Mar 2015 22:05:29 +0100 Message-ID: <8682755.oK0Ae34OOP@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20150225172757.421.43718@quantum> References: <1424876018-17852-1-git-send-email-shawn.guo@linaro.org> <1424876018-17852-2-git-send-email-shawn.guo@linaro.org> <20150225172757.421.43718@quantum> MIME-Version: 1.0 X-Provags-ID: V03:K0:VbFJfDqm9mzxjy39edw8hMRY2wPCn9PRJFBrXLLnV+eB7JClie5 nN9m4+6lTUYDS3SkdyMG/9jjql1CIIxxQpswS0AACU3iw344CiR4gLGdKYeDfPm4M7wvvG1 giKK7cyY5UAdPvlcH5Q1TAwJvydXQVPfa4fqtHb3sJRlyyy+rhLROe7mYbWjzcSvOrCxhfy 67Cgsf40D9vB2/jHfI12A== X-UI-Out-Filterresults: notjunk:1; Cc: linux-pwm@vger.kernel.org, alsa-devel@alsa-project.org, Mike Turquette , kernel@pengutronix.de, Greg Kroah-Hartman , Stephen Boyd , dri-devel@lists.freedesktop.org, Mark Brown , Thierry Reding , linux-serial@vger.kernel.org, Russell King , Shawn Guo Subject: [alsa-devel] [PATCH] clk: provide clk_is_match() dummy for non-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 ARM randconfig build tests found a new error for configurations with COMMON_CLK disabled but HAS_CLK selected by the platform: ERROR: "clk_is_match" [sound/soc/fsl/snd-soc-fsl-spdif.ko] undefined! This moves the declaration around, so this case is covered by the existing static inline helper function. Signed-off-by: Arnd Bergmann Fixes: c69e182e51d89 ("clk: introduce clk_is_match") ---- BTW, we have a preexisting problem in clk_get_parent, clk_round_rate and clk_set_parent, which I've worked around in my randconfig builds so far. Should we do that the same way? diff --git a/include/linux/clk.h b/include/linux/clk.h index 5c076e4d90f9..a9b91595d106 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -125,6 +125,19 @@ int clk_set_phase(struct clk *clk, int degrees); */ int clk_get_phase(struct clk *clk); +/** + * clk_is_match - check if two clk's point to the same hardware clock + * @p: clk compared against q + * @q: clk compared against p + * + * Returns true if the two struct clk pointers both point to the same hardware + * clock node. Put differently, returns true if struct clk *p and struct clk *q + * share the same struct clk_core object. + * + * Returns false otherwise. Note that two NULL clks are treated as matching. + */ +bool clk_is_match(struct clk *p, struct clk *q); + #else static inline long clk_get_accuracy(struct clk *clk) @@ -142,6 +155,11 @@ static inline long clk_get_phase(struct clk *clk) return -ENOTSUPP; } +static inline bool clk_is_match(struct clk *p, struct clk *q) +{ + return p == q ? true : false; +} + #endif /** @@ -376,19 +394,6 @@ struct clk *clk_get_parent(struct clk *clk); */ struct clk *clk_get_sys(const char *dev_id, const char *con_id); -/** - * clk_is_match - check if two clk's point to the same hardware clock - * @p: clk compared against q - * @q: clk compared against p - * - * Returns true if the two struct clk pointers both point to the same hardware - * clock node. Put differently, returns true if struct clk *p and struct clk *q - * share the same struct clk_core object. - * - * Returns false otherwise. Note that two NULL clks are treated as matching. - */ -bool clk_is_match(struct clk *p, struct clk *q); - #else /* !CONFIG_HAVE_CLK */ static inline struct clk *clk_get(struct device *dev, const char *id) @@ -442,11 +447,6 @@ static inline struct clk *clk_get_parent(struct clk *clk) return NULL; } -static inline bool clk_is_match(struct clk *p, struct clk *q) -{ - return p == q ? true : false; -} - #endif /* clk_prepare_enable helps cases using clk_enable in non-atomic context. */