Message ID | 20210515131217.1540412-7-dmitry.baryshkov@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | dsi: rework clock parents and timing handling | expand |
On 2021-05-15 06:12, Dmitry Baryshkov wrote: > Use of_device_get_match-data() instead of of_match_node(). > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org> > --- > drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c > b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c > index f2b5e0f63a16..feaeb34b7071 100644 > --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c > +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c > @@ -625,17 +625,12 @@ static int dsi_phy_driver_probe(struct > platform_device *pdev) > { > struct msm_dsi_phy *phy; > struct device *dev = &pdev->dev; > - const struct of_device_id *match; > int ret; > > phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL); > if (!phy) > return -ENOMEM; > > - match = of_match_node(dsi_phy_dt_match, dev->of_node); > - if (!match) > - return -ENODEV; > - > phy->provided_clocks = devm_kzalloc(dev, > struct_size(phy->provided_clocks, hws, NUM_PROVIDED_CLKS), > GFP_KERNEL); > @@ -644,7 +639,10 @@ static int dsi_phy_driver_probe(struct > platform_device *pdev) > > phy->provided_clocks->num = NUM_PROVIDED_CLKS; > > - phy->cfg = match->data; > + phy->cfg = of_device_get_match_data(&pdev->dev); > + if (!phy->cfg) > + return -ENODEV; > + > phy->pdev = pdev; > > phy->id = dsi_phy_get_id(phy);
diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c index f2b5e0f63a16..feaeb34b7071 100644 --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c @@ -625,17 +625,12 @@ static int dsi_phy_driver_probe(struct platform_device *pdev) { struct msm_dsi_phy *phy; struct device *dev = &pdev->dev; - const struct of_device_id *match; int ret; phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL); if (!phy) return -ENOMEM; - match = of_match_node(dsi_phy_dt_match, dev->of_node); - if (!match) - return -ENODEV; - phy->provided_clocks = devm_kzalloc(dev, struct_size(phy->provided_clocks, hws, NUM_PROVIDED_CLKS), GFP_KERNEL); @@ -644,7 +639,10 @@ static int dsi_phy_driver_probe(struct platform_device *pdev) phy->provided_clocks->num = NUM_PROVIDED_CLKS; - phy->cfg = match->data; + phy->cfg = of_device_get_match_data(&pdev->dev); + if (!phy->cfg) + return -ENODEV; + phy->pdev = pdev; phy->id = dsi_phy_get_id(phy);
Use of_device_get_match-data() instead of of_match_node(). Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> --- drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) -- 2.30.2