Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754922AbbETRR2 (ORCPT ); Wed, 20 May 2015 13:17:28 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:1466 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753388AbbETRRZ (ORCPT ); Wed, 20 May 2015 13:17:25 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Wed, 20 May 2015 10:14:33 -0700 Message-ID: <555CC1A2.9070605@nvidia.com> Date: Wed, 20 May 2015 13:17:22 -0400 From: Rhyland Klein User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Benson Leung CC: Peter De Schrijver , Mike Turquette , Stephen Warren , Stephen Boyd , Thierry Reding , Alexandre Courbot , Bill Huang , Paul Walmsley , Jim Lin , , , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v5 20/21] clk: tegra210: add support for Tegra210 clocks References: <1431451444-23155-1-git-send-email-rklein@nvidia.com> <1431451444-23155-22-git-send-email-rklein@nvidia.com> In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1018 Lines: 33 On 5/14/2015 4:23 PM, Benson Leung wrote: > 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? > Sure, I'll add that for v6. -rhyland -- nvpublic -- 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/