Message ID | 20250331173124559aCNI8BfX0ay0U5wryryME@zte.com.cn (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Replace custom compare_dev with component_compare_of in drm | expand |
On Mon, Mar 31, 2025 at 05:31:24PM +0800, shao.mingyin@zte.com.cn wrote: > From: Tang Dongxing <tang.dongxing@zte.com.cn> > > Remove the custom device comparison function compare_dev and replace it > with the existing kernel helper component_compare_of > > Signed-off-by: Tang Dongxing <tang.dongxing@zte.com.cn> > Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn> Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> Best regards, Liviu > --- > drivers/gpu/drm/arm/malidp_drv.c | 9 +-------- > 1 file changed, 1 insertion(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c > index e083021e9e99..e2e6fd1f64b0 100644 > --- a/drivers/gpu/drm/arm/malidp_drv.c > +++ b/drivers/gpu/drm/arm/malidp_drv.c > @@ -910,13 +910,6 @@ static const struct component_master_ops malidp_master_ops = { > .unbind = malidp_unbind, > }; > > -static int malidp_compare_dev(struct device *dev, void *data) > -{ > - struct device_node *np = data; > - > - return dev->of_node == np; > -} > - > static int malidp_platform_probe(struct platform_device *pdev) > { > struct device_node *port; > @@ -930,7 +923,7 @@ static int malidp_platform_probe(struct platform_device *pdev) > if (!port) > return -ENODEV; > > - drm_of_component_match_add(&pdev->dev, &match, malidp_compare_dev, > + drm_of_component_match_add(&pdev->dev, &match, component_compare_of, > port); > of_node_put(port); > return component_master_add_with_match(&pdev->dev, &malidp_master_ops, > -- > 2.25.1
diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index e083021e9e99..e2e6fd1f64b0 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -910,13 +910,6 @@ static const struct component_master_ops malidp_master_ops = { .unbind = malidp_unbind, }; -static int malidp_compare_dev(struct device *dev, void *data) -{ - struct device_node *np = data; - - return dev->of_node == np; -} - static int malidp_platform_probe(struct platform_device *pdev) { struct device_node *port; @@ -930,7 +923,7 @@ static int malidp_platform_probe(struct platform_device *pdev) if (!port) return -ENODEV; - drm_of_component_match_add(&pdev->dev, &match, malidp_compare_dev, + drm_of_component_match_add(&pdev->dev, &match, component_compare_of, port); of_node_put(port); return component_master_add_with_match(&pdev->dev, &malidp_master_ops,