Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757516AbaJIPEB (ORCPT ); Thu, 9 Oct 2014 11:04:01 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:37753 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757401AbaJIPCM (ORCPT ); Thu, 9 Oct 2014 11:02:12 -0400 From: Tomeu Vizoso To: Mike Turquette Cc: Javier Martinez Canillas , Stephen Boyd , Tomeu Vizoso , Ralf Baechle , Manuel Lauss , linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/8] MIPS: Alchemy: Remove direct access to prepare_count field of struct clk Date: Thu, 9 Oct 2014 17:01:09 +0200 Message-Id: <1412866903-6970-2-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1412866903-6970-1-git-send-email-tomeu.vizoso@collabora.com> References: <1412866903-6970-1-git-send-email-tomeu.vizoso@collabora.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replacing it with a call to __clk_is_prepared(), which isn't entirely equivalent but in practice shouldn't matter. Signed-off-by: Tomeu Vizoso --- arch/mips/alchemy/common/clock.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/mips/alchemy/common/clock.c b/arch/mips/alchemy/common/clock.c index d7557cd..203e440 100644 --- a/arch/mips/alchemy/common/clock.c +++ b/arch/mips/alchemy/common/clock.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -397,10 +396,10 @@ static long alchemy_clk_fgcs_detr(struct clk_hw *hw, unsigned long rate, break; /* if this parent is currently unused, remember it. - * XXX: I know it's a layering violation, but it works - * so well.. (if (!clk_has_active_children(pc)) ) + * XXX: we would actually want clk_has_active_children() + * but this is a good-enough approximation for now. */ - if (pc->prepare_count == 0) { + if (!__clk_is_prepared(pc)) { if (!free) free = pc; } -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/