From: Neil Armstrong <narmstrong@baylibre.com>
To: cgel.zte@gmail.com, mturquette@baylibre.com
Cc: sboyd@kernel.org, linux-clk@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-oxnas@groups.io,
linux-kernel@vger.kernel.org,
Minghao Chi <chi.minghao@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] clk: Use of_device_get_match_data()
Date: Thu, 3 Mar 2022 09:07:11 +0100 [thread overview]
Message-ID: <7d585748-7a41-13ca-60da-20eb4fe78374@baylibre.com> (raw)
In-Reply-To: <20220303014856.2059307-1-chi.minghao@zte.com.cn>
On 03/03/2022 02:48, cgel.zte@gmail.com wrote:
> From: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn>
>
> Use of_device_get_match_data() to simplify the code.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn>
> ---
> drivers/clk/clk-oxnas.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/clk/clk-oxnas.c b/drivers/clk/clk-oxnas.c
> index 78d5ea669fea..cda5e258355b 100644
> --- a/drivers/clk/clk-oxnas.c
> +++ b/drivers/clk/clk-oxnas.c
> @@ -209,15 +209,11 @@ static int oxnas_stdclk_probe(struct platform_device *pdev)
> {
> struct device_node *np = pdev->dev.of_node;
> const struct oxnas_stdclk_data *data;
> - const struct of_device_id *id;
> struct regmap *regmap;
> int ret;
> int i;
>
> - id = of_match_device(oxnas_stdclk_dt_ids, &pdev->dev);
> - if (!id)
> - return -ENODEV;
> - data = id->data;
> + data = of_device_get_match_data(&pdev->dev);
>
> regmap = syscon_node_to_regmap(of_get_parent(np));
> if (IS_ERR(regmap)) {
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
next prev parent reply other threads:[~2022-03-03 8:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-03 1:48 cgel.zte
2022-03-03 8:07 ` Neil Armstrong [this message]
2022-03-12 3:24 ` 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=7d585748-7a41-13ca-60da-20eb4fe78374@baylibre.com \
--to=narmstrong@baylibre.com \
--cc=cgel.zte@gmail.com \
--cc=chi.minghao@zte.com.cn \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-oxnas@groups.io \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
--cc=zealci@zte.com.cn \
/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
all inboxes | Powered by JetHome®