* [PATCH] phy/rockchip: Use of_device_get_match_data()
@ 2022-03-03 1:44 ` cgel.zte
0 siblings, 0 replies; 16+ messages in thread
From: cgel.zte @ 2022-03-03 1:44 UTC (permalink / raw)
To: kishon
Cc: vkoul, heiko, linux-phy, linux-arm-kernel, linux-rockchip,
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/phy/rockchip/phy-rockchip-dphy-rx0.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-dphy-rx0.c b/drivers/phy/rockchip/phy-rockchip-dphy-rx0.c
index 4df9476ef2a9..639452f47869 100644
--- a/drivers/phy/rockchip/phy-rockchip-dphy-rx0.c
+++ b/drivers/phy/rockchip/phy-rockchip-dphy-rx0.c
@@ -327,7 +327,6 @@ static int rk_dphy_probe(struct platform_device *pdev)
struct device_node *np = dev->of_node;
const struct rk_dphy_drv_data *drv_data;
struct phy_provider *phy_provider;
- const struct of_device_id *of_id;
struct rk_dphy *priv;
struct phy *phy;
unsigned int i;
@@ -347,11 +346,7 @@ static int rk_dphy_probe(struct platform_device *pdev)
return -ENODEV;
}
- of_id = of_match_device(rk_dphy_dt_ids, dev);
- if (!of_id)
- return -EINVAL;
-
- drv_data = of_id->data;
+ drv_data = of_device_get_match_data(dev);
priv->drv_data = drv_data;
priv->clks = devm_kcalloc(&pdev->dev, drv_data->num_clks,
sizeof(*priv->clks), GFP_KERNEL);
--
2.25.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH] phy/rockchip: Use of_device_get_match_data()
@ 2022-03-03 1:44 ` cgel.zte
0 siblings, 0 replies; 16+ messages in thread
From: cgel.zte @ 2022-03-03 1:44 UTC (permalink / raw)
To: kishon
Cc: vkoul, heiko, linux-phy, linux-arm-kernel, linux-rockchip,
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/phy/rockchip/phy-rockchip-dphy-rx0.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-dphy-rx0.c b/drivers/phy/rockchip/phy-rockchip-dphy-rx0.c
index 4df9476ef2a9..639452f47869 100644
--- a/drivers/phy/rockchip/phy-rockchip-dphy-rx0.c
+++ b/drivers/phy/rockchip/phy-rockchip-dphy-rx0.c
@@ -327,7 +327,6 @@ static int rk_dphy_probe(struct platform_device *pdev)
struct device_node *np = dev->of_node;
const struct rk_dphy_drv_data *drv_data;
struct phy_provider *phy_provider;
- const struct of_device_id *of_id;
struct rk_dphy *priv;
struct phy *phy;
unsigned int i;
@@ -347,11 +346,7 @@ static int rk_dphy_probe(struct platform_device *pdev)
return -ENODEV;
}
- of_id = of_match_device(rk_dphy_dt_ids, dev);
- if (!of_id)
- return -EINVAL;
-
- drv_data = of_id->data;
+ drv_data = of_device_get_match_data(dev);
priv->drv_data = drv_data;
priv->clks = devm_kcalloc(&pdev->dev, drv_data->num_clks,
sizeof(*priv->clks), GFP_KERNEL);
--
2.25.1
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH] phy/rockchip: Use of_device_get_match_data()
@ 2022-03-03 1:44 ` cgel.zte
0 siblings, 0 replies; 16+ messages in thread
From: cgel.zte @ 2022-03-03 1:44 UTC (permalink / raw)
To: kishon
Cc: vkoul, heiko, linux-phy, linux-arm-kernel, linux-rockchip,
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/phy/rockchip/phy-rockchip-dphy-rx0.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-dphy-rx0.c b/drivers/phy/rockchip/phy-rockchip-dphy-rx0.c
index 4df9476ef2a9..639452f47869 100644
--- a/drivers/phy/rockchip/phy-rockchip-dphy-rx0.c
+++ b/drivers/phy/rockchip/phy-rockchip-dphy-rx0.c
@@ -327,7 +327,6 @@ static int rk_dphy_probe(struct platform_device *pdev)
struct device_node *np = dev->of_node;
const struct rk_dphy_drv_data *drv_data;
struct phy_provider *phy_provider;
- const struct of_device_id *of_id;
struct rk_dphy *priv;
struct phy *phy;
unsigned int i;
@@ -347,11 +346,7 @@ static int rk_dphy_probe(struct platform_device *pdev)
return -ENODEV;
}
- of_id = of_match_device(rk_dphy_dt_ids, dev);
- if (!of_id)
- return -EINVAL;
-
- drv_data = of_id->data;
+ drv_data = of_device_get_match_data(dev);
priv->drv_data = drv_data;
priv->clks = devm_kcalloc(&pdev->dev, drv_data->num_clks,
sizeof(*priv->clks), GFP_KERNEL);
--
2.25.1
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH] phy/rockchip: Use of_device_get_match_data()
@ 2022-03-03 1:44 ` cgel.zte
0 siblings, 0 replies; 16+ messages in thread
From: cgel.zte @ 2022-03-03 1:44 UTC (permalink / raw)
To: kishon
Cc: vkoul, heiko, linux-phy, linux-arm-kernel, linux-rockchip,
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/phy/rockchip/phy-rockchip-dphy-rx0.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-dphy-rx0.c b/drivers/phy/rockchip/phy-rockchip-dphy-rx0.c
index 4df9476ef2a9..639452f47869 100644
--- a/drivers/phy/rockchip/phy-rockchip-dphy-rx0.c
+++ b/drivers/phy/rockchip/phy-rockchip-dphy-rx0.c
@@ -327,7 +327,6 @@ static int rk_dphy_probe(struct platform_device *pdev)
struct device_node *np = dev->of_node;
const struct rk_dphy_drv_data *drv_data;
struct phy_provider *phy_provider;
- const struct of_device_id *of_id;
struct rk_dphy *priv;
struct phy *phy;
unsigned int i;
@@ -347,11 +346,7 @@ static int rk_dphy_probe(struct platform_device *pdev)
return -ENODEV;
}
- of_id = of_match_device(rk_dphy_dt_ids, dev);
- if (!of_id)
- return -EINVAL;
-
- drv_data = of_id->data;
+ drv_data = of_device_get_match_data(dev);
priv->drv_data = drv_data;
priv->clks = devm_kcalloc(&pdev->dev, drv_data->num_clks,
sizeof(*priv->clks), GFP_KERNEL);
--
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] 16+ messages in thread
* Re: [PATCH] phy/rockchip: Use of_device_get_match_data()
2022-03-03 1:44 ` cgel.zte
(?)
(?)
@ 2022-04-13 9:53 ` Vinod Koul
-1 siblings, 0 replies; 16+ messages in thread
From: Vinod Koul @ 2022-04-13 9:53 UTC (permalink / raw)
To: cgel.zte
Cc: kishon, heiko, linux-phy, linux-arm-kernel, linux-rockchip,
linux-kernel, Minghao Chi, Zeal Robot
On 03-03-22, 01:44, 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.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] phy/rockchip: Use of_device_get_match_data()
@ 2022-04-13 9:53 ` Vinod Koul
0 siblings, 0 replies; 16+ messages in thread
From: Vinod Koul @ 2022-04-13 9:53 UTC (permalink / raw)
To: cgel.zte
Cc: kishon, heiko, linux-phy, linux-arm-kernel, linux-rockchip,
linux-kernel, Minghao Chi, Zeal Robot
On 03-03-22, 01:44, 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.
Applied, thanks
--
~Vinod
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] phy/rockchip: Use of_device_get_match_data()
@ 2022-04-13 9:53 ` Vinod Koul
0 siblings, 0 replies; 16+ messages in thread
From: Vinod Koul @ 2022-04-13 9:53 UTC (permalink / raw)
To: cgel.zte
Cc: kishon, heiko, linux-phy, linux-arm-kernel, linux-rockchip,
linux-kernel, Minghao Chi, Zeal Robot
On 03-03-22, 01:44, 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.
Applied, thanks
--
~Vinod
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] phy/rockchip: Use of_device_get_match_data()
@ 2022-04-13 9:53 ` Vinod Koul
0 siblings, 0 replies; 16+ messages in thread
From: Vinod Koul @ 2022-04-13 9:53 UTC (permalink / raw)
To: cgel.zte
Cc: kishon, heiko, linux-phy, linux-arm-kernel, linux-rockchip,
linux-kernel, Minghao Chi, Zeal Robot
On 03-03-22, 01:44, 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.
Applied, thanks
--
~Vinod
_______________________________________________
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] 16+ messages in thread
* Re: [PATCH] phy/rockchip: Use of_device_get_match_data()
2022-03-04 1:17 ` cgel.zte
(?)
(?)
@ 2022-04-13 9:53 ` Vinod Koul
-1 siblings, 0 replies; 16+ messages in thread
From: Vinod Koul @ 2022-04-13 9:53 UTC (permalink / raw)
To: cgel.zte
Cc: kishon, heiko, linux-phy, linux-arm-kernel, linux-rockchip,
linux-kernel, Minghao Chi, Zeal Robot
On 04-03-22, 01:17, 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.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] phy/rockchip: Use of_device_get_match_data()
@ 2022-04-13 9:53 ` Vinod Koul
0 siblings, 0 replies; 16+ messages in thread
From: Vinod Koul @ 2022-04-13 9:53 UTC (permalink / raw)
To: cgel.zte
Cc: kishon, heiko, linux-phy, linux-arm-kernel, linux-rockchip,
linux-kernel, Minghao Chi, Zeal Robot
On 04-03-22, 01:17, 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.
Applied, thanks
--
~Vinod
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] phy/rockchip: Use of_device_get_match_data()
@ 2022-04-13 9:53 ` Vinod Koul
0 siblings, 0 replies; 16+ messages in thread
From: Vinod Koul @ 2022-04-13 9:53 UTC (permalink / raw)
To: cgel.zte
Cc: kishon, heiko, linux-phy, linux-arm-kernel, linux-rockchip,
linux-kernel, Minghao Chi, Zeal Robot
On 04-03-22, 01:17, 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.
Applied, thanks
--
~Vinod
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] phy/rockchip: Use of_device_get_match_data()
@ 2022-04-13 9:53 ` Vinod Koul
0 siblings, 0 replies; 16+ messages in thread
From: Vinod Koul @ 2022-04-13 9:53 UTC (permalink / raw)
To: cgel.zte
Cc: kishon, heiko, linux-phy, linux-arm-kernel, linux-rockchip,
linux-kernel, Minghao Chi, Zeal Robot
On 04-03-22, 01:17, 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.
Applied, thanks
--
~Vinod
_______________________________________________
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] 16+ messages in thread
* [PATCH] phy/rockchip: Use of_device_get_match_data()
@ 2022-03-04 1:17 ` cgel.zte
0 siblings, 0 replies; 16+ messages in thread
From: cgel.zte @ 2022-03-04 1:17 UTC (permalink / raw)
To: kishon
Cc: vkoul, heiko, linux-phy, linux-arm-kernel, linux-rockchip,
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/phy/rockchip/phy-rockchip-typec.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-typec.c b/drivers/phy/rockchip/phy-rockchip-typec.c
index d2bbdc96a167..d76440ae10ff 100644
--- a/drivers/phy/rockchip/phy-rockchip-typec.c
+++ b/drivers/phy/rockchip/phy-rockchip-typec.c
@@ -1105,15 +1105,14 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)
struct phy_provider *phy_provider;
struct resource *res;
const struct rockchip_usb3phy_port_cfg *phy_cfgs;
- const struct of_device_id *match;
int index, ret;
tcphy = devm_kzalloc(dev, sizeof(*tcphy), GFP_KERNEL);
if (!tcphy)
return -ENOMEM;
- match = of_match_device(dev->driver->of_match_table, dev);
- if (!match || !match->data) {
+ phy_cfgs = of_device_get_match_data(dev);
+ if (!phy_cfgs) {
dev_err(dev, "phy configs are not assigned!\n");
return -EINVAL;
}
@@ -1123,7 +1122,6 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)
if (IS_ERR(tcphy->base))
return PTR_ERR(tcphy->base);
- phy_cfgs = match->data;
/* find out a proper config which can be matched with dt. */
index = 0;
while (phy_cfgs[index].reg) {
--
2.25.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH] phy/rockchip: Use of_device_get_match_data()
@ 2022-03-04 1:17 ` cgel.zte
0 siblings, 0 replies; 16+ messages in thread
From: cgel.zte @ 2022-03-04 1:17 UTC (permalink / raw)
To: kishon
Cc: vkoul, heiko, linux-phy, linux-arm-kernel, linux-rockchip,
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/phy/rockchip/phy-rockchip-typec.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-typec.c b/drivers/phy/rockchip/phy-rockchip-typec.c
index d2bbdc96a167..d76440ae10ff 100644
--- a/drivers/phy/rockchip/phy-rockchip-typec.c
+++ b/drivers/phy/rockchip/phy-rockchip-typec.c
@@ -1105,15 +1105,14 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)
struct phy_provider *phy_provider;
struct resource *res;
const struct rockchip_usb3phy_port_cfg *phy_cfgs;
- const struct of_device_id *match;
int index, ret;
tcphy = devm_kzalloc(dev, sizeof(*tcphy), GFP_KERNEL);
if (!tcphy)
return -ENOMEM;
- match = of_match_device(dev->driver->of_match_table, dev);
- if (!match || !match->data) {
+ phy_cfgs = of_device_get_match_data(dev);
+ if (!phy_cfgs) {
dev_err(dev, "phy configs are not assigned!\n");
return -EINVAL;
}
@@ -1123,7 +1122,6 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)
if (IS_ERR(tcphy->base))
return PTR_ERR(tcphy->base);
- phy_cfgs = match->data;
/* find out a proper config which can be matched with dt. */
index = 0;
while (phy_cfgs[index].reg) {
--
2.25.1
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH] phy/rockchip: Use of_device_get_match_data()
@ 2022-03-04 1:17 ` cgel.zte
0 siblings, 0 replies; 16+ messages in thread
From: cgel.zte @ 2022-03-04 1:17 UTC (permalink / raw)
To: kishon
Cc: vkoul, heiko, linux-phy, linux-arm-kernel, linux-rockchip,
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/phy/rockchip/phy-rockchip-typec.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-typec.c b/drivers/phy/rockchip/phy-rockchip-typec.c
index d2bbdc96a167..d76440ae10ff 100644
--- a/drivers/phy/rockchip/phy-rockchip-typec.c
+++ b/drivers/phy/rockchip/phy-rockchip-typec.c
@@ -1105,15 +1105,14 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)
struct phy_provider *phy_provider;
struct resource *res;
const struct rockchip_usb3phy_port_cfg *phy_cfgs;
- const struct of_device_id *match;
int index, ret;
tcphy = devm_kzalloc(dev, sizeof(*tcphy), GFP_KERNEL);
if (!tcphy)
return -ENOMEM;
- match = of_match_device(dev->driver->of_match_table, dev);
- if (!match || !match->data) {
+ phy_cfgs = of_device_get_match_data(dev);
+ if (!phy_cfgs) {
dev_err(dev, "phy configs are not assigned!\n");
return -EINVAL;
}
@@ -1123,7 +1122,6 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)
if (IS_ERR(tcphy->base))
return PTR_ERR(tcphy->base);
- phy_cfgs = match->data;
/* find out a proper config which can be matched with dt. */
index = 0;
while (phy_cfgs[index].reg) {
--
2.25.1
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH] phy/rockchip: Use of_device_get_match_data()
@ 2022-03-04 1:17 ` cgel.zte
0 siblings, 0 replies; 16+ messages in thread
From: cgel.zte @ 2022-03-04 1:17 UTC (permalink / raw)
To: kishon
Cc: vkoul, heiko, linux-phy, linux-arm-kernel, linux-rockchip,
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/phy/rockchip/phy-rockchip-typec.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-typec.c b/drivers/phy/rockchip/phy-rockchip-typec.c
index d2bbdc96a167..d76440ae10ff 100644
--- a/drivers/phy/rockchip/phy-rockchip-typec.c
+++ b/drivers/phy/rockchip/phy-rockchip-typec.c
@@ -1105,15 +1105,14 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)
struct phy_provider *phy_provider;
struct resource *res;
const struct rockchip_usb3phy_port_cfg *phy_cfgs;
- const struct of_device_id *match;
int index, ret;
tcphy = devm_kzalloc(dev, sizeof(*tcphy), GFP_KERNEL);
if (!tcphy)
return -ENOMEM;
- match = of_match_device(dev->driver->of_match_table, dev);
- if (!match || !match->data) {
+ phy_cfgs = of_device_get_match_data(dev);
+ if (!phy_cfgs) {
dev_err(dev, "phy configs are not assigned!\n");
return -EINVAL;
}
@@ -1123,7 +1122,6 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)
if (IS_ERR(tcphy->base))
return PTR_ERR(tcphy->base);
- phy_cfgs = match->data;
/* find out a proper config which can be matched with dt. */
index = 0;
while (phy_cfgs[index].reg) {
--
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] 16+ messages in thread
end of thread, other threads:[~2022-04-13 9:55 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-03 1:44 [PATCH] phy/rockchip: Use of_device_get_match_data() cgel.zte
2022-03-03 1:44 ` cgel.zte
2022-03-03 1:44 ` cgel.zte
2022-03-03 1:44 ` cgel.zte
2022-04-13 9:53 ` Vinod Koul
2022-04-13 9:53 ` Vinod Koul
2022-04-13 9:53 ` Vinod Koul
2022-04-13 9:53 ` Vinod Koul
2022-03-04 1:17 cgel.zte
2022-03-04 1:17 ` cgel.zte
2022-03-04 1:17 ` cgel.zte
2022-03-04 1:17 ` cgel.zte
2022-04-13 9:53 ` Vinod Koul
2022-04-13 9:53 ` Vinod Koul
2022-04-13 9:53 ` Vinod Koul
2022-04-13 9:53 ` Vinod Koul
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.