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/mediatek/mtk_drm_drv.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c 
b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
index 74158b9d6503..e1fbb0fe0597 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
@@ -627,11 +627,6 @@ static const struct drm_driver mtk_drm_driver = {
        .minor = DRIVER_MINOR,
 };

-static int compare_dev(struct device *dev, void *data)
-{
-       return dev == (struct device *)data;
-}
-
 static int mtk_drm_bind(struct device *dev)
 {
        struct mtk_drm_private *private = dev_get_drvdata(dev);
@@ -1119,7 +1114,7 @@ static int mtk_drm_probe(struct platform_device *pdev)
                private->ddp_comp[DDP_COMPONENT_DRM_OVL_ADAPTOR].dev = 
&ovl_adaptor->dev;
                mtk_ddp_comp_init(NULL, 
&private->ddp_comp[DDP_COMPONENT_DRM_OVL_ADAPTOR],
                                  DDP_COMPONENT_DRM_OVL_ADAPTOR);
-               component_match_add(dev, &match, compare_dev, 
&ovl_adaptor->dev);
+               component_match_add(dev, &match, component_compare_of, 
&ovl_adaptor->dev);
        }

        /* Iterate over sibling DISP function blocks */
-- 
2.25.1

Reply via email to