From patchwork Fri May 29 09:25:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 6505811 Return-Path: X-Original-To: patchwork-linux-omap@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 13DD39F38C for ; Fri, 29 May 2015 09:26:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3665D206AB for ; Fri, 29 May 2015 09:26:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 335AD2069B for ; Fri, 29 May 2015 09:26:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754051AbbE2J0L (ORCPT ); Fri, 29 May 2015 05:26:11 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:53577 "EHLO laurent.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755546AbbE2J0I (ORCPT ); Fri, 29 May 2015 05:26:08 -0400 Received: from ayla.of.borg ([84.193.93.87]) by laurent.telenet-ops.be with bizsmtp id ZlS41q00W1t5w8s01lS4RB; Fri, 29 May 2015 11:26:07 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1YyGYG-0005Oa-6h; Fri, 29 May 2015 11:26:04 +0200 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1YyGYM-00064w-Qo; Fri, 29 May 2015 11:26:10 +0200 From: Geert Uytterhoeven To: Boris Brezillon , Maxime Coquelin , Patrice Chotard , Tero Kristo , Mike Turquette , Stephen Boyd , Russell King Cc: linux-clk@vger.kernel.org, kernel@stlinux.com, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Geert Uytterhoeven Subject: [PATCH 4/5] [RFC] clk: Provide dummy of_clk_get_parent_count() for !OF/!CCF Date: Fri, 29 May 2015 11:25:48 +0200 Message-Id: <1432891549-23295-5-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1432891549-23295-1-git-send-email-geert+renesas@glider.be> References: <1432891549-23295-1-git-send-email-geert+renesas@glider.be> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Provide dummy implementations of of_clk_get_parent_count() for the cases where CONFIG_OF or CONFIG_COMMON_CLK are not set. Signed-off-by: Geert Uytterhoeven --- This is an RFC, as 1. Dummies are needed in two places, 2. We don't have any dummies yet for the !CCF case. --- include/linux/clk-provider.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 5378c2aba4d2eaec..d56bb0c6dd982c32 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -651,6 +651,10 @@ static inline struct clk *of_clk_src_onecell_get( { return ERR_PTR(-ENOENT); } +static inline int of_clk_get_parent_count(struct device_node *np) +{ + return -ENOENT; +} static inline const char *of_clk_get_parent_name(struct device_node *np, int index) { @@ -696,5 +700,10 @@ struct dentry *clk_debugfs_add_file(struct clk_hw *hw, char *name, umode_t mode, void *data, const struct file_operations *fops); #endif -#endif /* CONFIG_COMMON_CLK */ +#else /* !CONFIG_COMMON_CLK */ +static inline int of_clk_get_parent_count(struct device_node *np) +{ + return -ENOENT; +} +#endif /* !CONFIG_COMMON_CLK */ #endif /* CLK_PROVIDER_H */