From patchwork Fri Jan 19 15:18:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 10175555 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 BFCD760392 for ; Fri, 19 Jan 2018 15:18:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B16CE286C4 for ; Fri, 19 Jan 2018 15:18:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A411E286C7; Fri, 19 Jan 2018 15:18:52 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3AF5E286C4 for ; Fri, 19 Jan 2018 15:18:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=UAkZMW0l6LODGH49H6gq9LwpDjkEZxkj1eGY6oo09pA=; b=L+ChyB207k/zsbzUs3fVpnksV8 Yp8p4t0q2C7pehdLc1x6K8gYzw2sCOerC2+WFLc9epypt/HTYti6Yz8YuFz41DI/IbUTKcT/1gsht rneMufIH4OBkjjpeH5oJ2zE3kKd4+RLK4IObsNRGYDjxNnumhflJ7hrRLuu0DzGEadRaQY7mLlkiS 53KGrYpNxZLV7vSnncGwpu92P2++GW+evPqGQz8C401OzURoiPp6n34F6ZdSkcuyX/KjT86HhH5Gk NQ/xkkViEDdxqEevU8Ock7i/WZw1Xr+eciZf5nlF+AAf4dEB3+MaK1smEinpZZg8V+mc3oA8BUFLL TWcsX0Jw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ecYRN-0002Kb-WE; Fri, 19 Jan 2018 15:18:50 +0000 Received: from michel.telenet-ops.be ([2a02:1800:110:4::f00:18]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ecYRJ-0002JA-Of for linux-rockchip@lists.infradead.org; Fri, 19 Jan 2018 15:18:48 +0000 Received: from ayla.of.borg ([84.195.106.246]) by michel.telenet-ops.be with bizsmtp id 0FJS1x0185JzmfG06FJSph; Fri, 19 Jan 2018 16:18:29 +0100 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1ecYR0-0005Qp-LQ; Fri, 19 Jan 2018 16:18:26 +0100 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1ecYR0-0007m4-FA; Fri, 19 Jan 2018 16:18:26 +0100 From: Geert Uytterhoeven To: Maxime Ripard , Chen-Yu Tsai , Heiko Stuebner , Thierry Reding , Jonathan Hunter Subject: [PATCH 1/3] pinctrl: sunxi: Use of_clk_get_parent_count() instead of open coding Date: Fri, 19 Jan 2018 16:18:19 +0100 Message-Id: <1516375101-29836-2-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516375101-29836-1-git-send-email-geert+renesas@glider.be> References: <1516375101-29836-1-git-send-email-geert+renesas@glider.be> X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Geert Uytterhoeven , linux-rockchip@lists.infradead.org, Linus Walleij , linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Geert Uytterhoeven --- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c index 4b6cb25bc796f86d..ab425eb45bf5e0f4 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -1185,7 +1186,7 @@ static int sunxi_pinctrl_setup_debounce(struct sunxi_pinctrl *pctl, int i, ret; /* Deal with old DTs that didn't have the oscillators */ - if (of_count_phandle_with_args(node, "clocks", "#clock-cells") != 3) + if (of_clk_get_parent_count(node) != 3) return 0; /* If we don't have any setup, bail out */