* [PATCH] clk: Use of_device_get_match_data()
@ 2022-03-03 1:48 ` cgel.zte
0 siblings, 0 replies; 6+ messages in thread
From: cgel.zte @ 2022-03-03 1:48 UTC (permalink / raw)
To: mturquette
Cc: sboyd, narmstrong, linux-clk, linux-arm-kernel, linux-oxnas,
linux-kernel, Minghao Chi, Zeal Robot
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)) {
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] clk: Use of_device_get_match_data()
@ 2022-03-03 1:48 ` cgel.zte
0 siblings, 0 replies; 6+ messages in thread
From: cgel.zte @ 2022-03-03 1:48 UTC (permalink / raw)
To: mturquette
Cc: sboyd, narmstrong, linux-clk, linux-arm-kernel, linux-oxnas,
linux-kernel, Minghao Chi, Zeal Robot
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)) {
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] clk: Use of_device_get_match_data()
2022-03-03 1:48 ` cgel.zte
@ 2022-03-03 8:07 ` Neil Armstrong
-1 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2022-03-03 8:07 UTC (permalink / raw)
To: cgel.zte, mturquette
Cc: sboyd, linux-clk, linux-arm-kernel, linux-oxnas, linux-kernel,
Minghao Chi, Zeal Robot
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] clk: Use of_device_get_match_data()
@ 2022-03-03 8:07 ` Neil Armstrong
0 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2022-03-03 8:07 UTC (permalink / raw)
To: cgel.zte, mturquette
Cc: sboyd, linux-clk, linux-arm-kernel, linux-oxnas, linux-kernel,
Minghao Chi, Zeal Robot
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>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] clk: Use of_device_get_match_data()
2022-03-03 1:48 ` cgel.zte
@ 2022-03-12 3:24 ` Stephen Boyd
-1 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2022-03-12 3:24 UTC (permalink / raw)
To: cgel.zte, mturquette
Cc: narmstrong, linux-clk, linux-arm-kernel, linux-oxnas,
linux-kernel, Minghao Chi, Zeal Robot
Quoting cgel.zte@gmail.com (2022-03-02 17:48:56)
> 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>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] clk: Use of_device_get_match_data()
@ 2022-03-12 3:24 ` Stephen Boyd
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2022-03-12 3:24 UTC (permalink / raw)
To: cgel.zte, mturquette
Cc: narmstrong, linux-clk, linux-arm-kernel, linux-oxnas,
linux-kernel, Minghao Chi, Zeal Robot
Quoting cgel.zte@gmail.com (2022-03-02 17:48:56)
> 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>
> ---
Applied to clk-next
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-03-12 3:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-03 1:48 [PATCH] clk: Use of_device_get_match_data() cgel.zte
2022-03-03 1:48 ` cgel.zte
2022-03-03 8:07 ` Neil Armstrong
2022-03-03 8:07 ` Neil Armstrong
2022-03-12 3:24 ` Stephen Boyd
2022-03-12 3:24 ` Stephen Boyd
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.