public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Len Brown <len.brown@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [PATCH v2] drivers: base: power: Use of_clk_get_parent_count()
Date: Fri, 31 May 2019 11:28:54 +0200	[thread overview]
Message-ID: <11314269.jSQc6MYxeX@kreacher> (raw)
In-Reply-To: <20190527120535.176015-1-wangkefeng.wang@huawei.com>

On Monday, May 27, 2019 2:05:35 PM CEST Kefeng Wang wrote:
> Use of_clk_get_parent_count() instead of open coding.
> 
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
>  drivers/base/power/clock_ops.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c
> index 59d19dd64928..3e84e3085d43 100644
> --- a/drivers/base/power/clock_ops.c
> +++ b/drivers/base/power/clock_ops.c
> @@ -12,6 +12,7 @@
>  #include <linux/pm_clock.h>
>  #include <linux/clk.h>
>  #include <linux/clkdev.h>
> +#include <linux/of_clk.h>
>  #include <linux/slab.h>
>  #include <linux/err.h>
>  #include <linux/pm_domain.h>
> @@ -195,8 +196,7 @@ int of_pm_clk_add_clks(struct device *dev)
>  	if (!dev || !dev->of_node)
>  		return -EINVAL;
>  
> -	count = of_count_phandle_with_args(dev->of_node, "clocks",
> -					   "#clock-cells");
> +	count = of_clk_get_parent_count(dev->of_node);
>  	if (count <= 0)
>  		return -ENODEV;
>  
> 

Applied, thanks!





      reply	other threads:[~2019-05-31  9:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-25 12:01 [PATCH] drivers: base: power: Use of_clk_get_parent_count() Kefeng Wang
2019-05-27 10:34 ` Rafael J. Wysocki
2019-05-27 11:08 ` Geert Uytterhoeven
2019-05-27 11:57   ` Kefeng Wang
2019-05-27 12:05   ` [PATCH v2] " Kefeng Wang
2019-05-31  9:28     ` Rafael J. Wysocki [this message]

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=11314269.jSQc6MYxeX@kreacher \
    --to=rjw@rjwysocki.net \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=wangkefeng.wang@huawei.com \
    /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