drm/hirin: Make use of the helper component_compare_of
authorYong Wu <yong.wu@mediatek.com>
Mon, 14 Feb 2022 06:08:01 +0000 (14:08 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Feb 2022 11:16:12 +0000 (12:16 +0100)
Use the common compare helper from component.

Cc: Xinliang Liu <xinliang.liu@linaro.org>
Cc: Tian Tao <tiantao6@hisilicon.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com>
Cc: Chen Feng <puck.chen@hisilicon.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Hao Fang <fanghao11@huawei.com>
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Link: https://lore.kernel.org/r/20220214060819.7334-6-yong.wu@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c

index 98ae9a4..8041ec1 100644 (file)
@@ -203,11 +203,6 @@ err_mode_config_cleanup:
        return ret;
 }
 
-static int compare_of(struct device *dev, void *data)
-{
-       return dev->of_node == data;
-}
-
 static int kirin_drm_kms_cleanup(struct drm_device *dev)
 {
        drm_kms_helper_poll_fini(dev);
@@ -278,7 +273,7 @@ static int kirin_drm_platform_probe(struct platform_device *pdev)
        if (!remote)
                return -ENODEV;
 
-       drm_of_component_match_add(dev, &match, compare_of, remote);
+       drm_of_component_match_add(dev, &match, component_compare_of, remote);
        of_node_put(remote);
 
        return component_master_add_with_match(dev, &kirin_drm_ops, match);