Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161147AbbENUXT (ORCPT ); Thu, 14 May 2015 16:23:19 -0400 Received: from mail-ig0-f171.google.com ([209.85.213.171]:38365 "EHLO mail-ig0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965107AbbENUXD (ORCPT ); Thu, 14 May 2015 16:23:03 -0400 MIME-Version: 1.0 In-Reply-To: <1431451444-23155-22-git-send-email-rklein@nvidia.com> References: <1431451444-23155-1-git-send-email-rklein@nvidia.com> <1431451444-23155-22-git-send-email-rklein@nvidia.com> Date: Thu, 14 May 2015 13:23:02 -0700 X-Google-Sender-Auth: kdCxRqXYochl-HF0LV-15eq3k-c Message-ID: Subject: Re: [PATCH v5 20/21] clk: tegra210: add support for Tegra210 clocks From: Benson Leung To: Rhyland Klein Cc: Peter De Schrijver , Mike Turquette , Stephen Warren , Stephen Boyd , Thierry Reding , Alexandre Courbot , Bill Huang , Paul Walmsley , Jim Lin , linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 964 Lines: 29 On Tue, May 12, 2015 at 10:24 AM, Rhyland Klein wrote: > +static int _p_div_to_hw(struct clk_hw *hw, u8 p_div) > +{ > + struct tegra_clk_pll *pll = to_clk_pll(hw); > + struct pdiv_map *p_tohw = pll->params->pdiv_tohw; > + > + if (p_tohw) { > + while (p_tohw->pdiv) { > + if (p_div <= p_tohw->pdiv) > + return p_tohw->hw_val; > + p_tohw++; > + } > + return -EINVAL; > + } > + return -EINVAL; > +} This is the same function as the one that lives in clk-pll.c. Can you make these common? -- Benson Leung Software Engineer, Chrom* OS bleung@chromium.org -- 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/