From: Tang Dongxing <tang.dongx...@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.dongx...@zte.com.cn> Signed-off-by: Shao Mingyin <shao.ming...@zte.com.cn> --- 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