mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
To: Stephen Boyd <sboyd@codeaurora.org>,
	Mike Turquette <mturquette@linaro.org>
Cc: linux-kernel@vger.kernel.org,
	Sylwester Nawrocki <s.nawrocki@samsung.com>
Subject: Re: [PATCH 3/3] clk: Replace of_clk_get_by_clkspec() with of_clk_get_from_provider()
Date: Fri, 06 Feb 2015 12:43:05 +0100	[thread overview]
Message-ID: <54D4A8C9.9000507@collabora.com> (raw)
In-Reply-To: <1423181968-32149-4-git-send-email-sboyd@codeaurora.org>

On 02/06/2015 01:19 AM, Stephen Boyd wrote:
> of_clk_get_by_clkspec() has the same function signature as
> of_clk_get_from_provider()
> 
>  struct clk *of_clk_get_by_clkspec(struct of_phandle_args
>  *clkspec)
>  struct clk *of_clk_get_from_provider(struct of_phandle_args
>  *clkspec)
> 
> except of_clk_get_by_clkspec() checks to make sure clkspec is not
> NULL. Let's remove of_clk_get_by_clkspec() and replace the
> callers of it (clkconf.c) with of_clk_get_from_provider().
> 
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> ---
>  drivers/clk/clk-conf.c |  6 +++---
>  drivers/clk/clk.c      | 31 ++++++++++++++-----------------
>  drivers/clk/clk.h      |  3 ---
>  drivers/clk/clkdev.c   | 30 +-----------------------------
>  4 files changed, 18 insertions(+), 52 deletions(-)
> 
> diff --git a/drivers/clk/clk-conf.c b/drivers/clk/clk-conf.c
> index aad4796aa3ed..6a681a2c4c89 100644
> --- a/drivers/clk/clk-conf.c
> +++ b/drivers/clk/clk-conf.c
> @@ -39,7 +39,7 @@ static int __set_clk_parents(struct device_node *node, bool clk_supplier)
>  		}
>  		if (clkspec.np == node && !clk_supplier)
>  			return 0;
> -		pclk = of_clk_get_by_clkspec(&clkspec);
> +		pclk = of_clk_get_from_provider(&clkspec);
>  		if (IS_ERR(pclk)) {
>  			pr_warn("clk: couldn't get parent clock %d for %s\n",
>  				index, node->full_name);
> @@ -54,7 +54,7 @@ static int __set_clk_parents(struct device_node *node, bool clk_supplier)
>  			rc = 0;
>  			goto err;
>  		}
> -		clk = of_clk_get_by_clkspec(&clkspec);
> +		clk = of_clk_get_from_provider(&clkspec);
>  		if (IS_ERR(clk)) {
>  			pr_warn("clk: couldn't get parent clock %d for %s\n",
>  				index, node->full_name);
> @@ -98,7 +98,7 @@ static int __set_clk_rates(struct device_node *node, bool clk_supplier)
>  			if (clkspec.np == node && !clk_supplier)
>  				return 0;
>  
> -			clk = of_clk_get_by_clkspec(&clkspec);
> +			clk = of_clk_get_from_provider(&clkspec);
>  			if (IS_ERR(clk)) {
>  				pr_warn("clk: couldn't get clock %d for %s\n",
>  					index, node->full_name);
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index 315dc22b7356..5d804a43ab1a 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -2807,16 +2807,6 @@ static LIST_HEAD(of_clk_providers);
>  static DEFINE_MUTEX(of_clk_mutex);
>  
>  /* of_clk_provider list locking helpers */

Patch looks good to me, but this comment can be removed now.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>

Thanks,

Tomeu

  reply	other threads:[~2015-02-06 11:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-06  0:19 [PATCH 0/3] CCF fixes/cleanup for per-user series Stephen Boyd
2015-02-06  0:19 ` [PATCH 1/3] clkdev: Always allocate a struct clk and call __clk_get() w/ CCF Stephen Boyd
2015-02-06  0:36   ` Stephen Boyd
2015-02-06  0:19 ` [PATCH 2/3] clk: Rename child_node to clks_node to avoid confusion Stephen Boyd
2015-02-06 14:02   ` Tomeu Vizoso
2015-02-06  0:19 ` [PATCH 3/3] clk: Replace of_clk_get_by_clkspec() with of_clk_get_from_provider() Stephen Boyd
2015-02-06 11:43   ` Tomeu Vizoso [this message]
2015-02-06 17:24     ` Stephen Boyd
2015-02-06  1:40 ` [PATCH v2] clkdev: Always allocate a struct clk and call __clk_get() w/ CCF Stephen Boyd
2015-02-06 10:57   ` Sylwester Nawrocki
2015-02-06 11:23     ` Tomeu Vizoso
2015-02-06 17:36     ` Stephen Boyd
2015-02-06 12:34   ` Tomeu Vizoso
2015-02-06 17:11     ` Stephen Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54D4A8C9.9000507@collabora.com \
    --to=tomeu.vizoso@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=s.nawrocki@samsung.com \
    --cc=sboyd@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome