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 <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>
> ---
>  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 <[email protected]>

Thanks,

Tomeu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to