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,
Stephen Boyd <sboyd@codeaurora.org>,
Jon Hunter <jonathanh@nvidia.com>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH] drivers: base: power: Use of_clk_get_parent_count()
Date: Mon, 27 May 2019 12:34:02 +0200 [thread overview]
Message-ID: <2586134.4dTKnEaoxt@kreacher> (raw)
In-Reply-To: <20190525120155.108948-1-wangkefeng.wang@huawei.com>
On Saturday, May 25, 2019 2:01:55 PM CEST Kefeng Wang wrote:
> Use of_clk_get_parent_count() instead of open coding.
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
> drivers/base/power/clock_ops.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c
> index 59d19dd64928..9c7e83267eac 100644
> --- a/drivers/base/power/clock_ops.c
> +++ b/drivers/base/power/clock_ops.c
> @@ -195,8 +195,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;
>
>
I need someone to look at this from DT perspective.
next prev parent reply other threads:[~2019-05-27 10:34 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 [this message]
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
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=2586134.4dTKnEaoxt@kreacher \
--to=rjw@rjwysocki.net \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=jonathanh@nvidia.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=sboyd@codeaurora.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