[PATCH 05/23] drm/hirin: Make use of the helper component_compare_of
Yong Wu
yong.wu at mediatek.com
Sun Feb 13 22:08:01 PST 2022
Use the common compare helper from component.
Cc: Xinliang Liu <xinliang.liu at linaro.org>
Cc: Tian Tao <tiantao6 at hisilicon.com>
Cc: John Stultz <john.stultz at linaro.org>
Cc: Xinwei Kong <kong.kongxinwei at hisilicon.com>
Cc: Chen Feng <puck.chen at hisilicon.com>
Cc: Thomas Zimmermann <tzimmermann at suse.de>
Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Cc: Hao Fang <fanghao11 at huawei.com>
Signed-off-by: Yong Wu <yong.wu at mediatek.com>
---
drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
index 98ae9a48f3fe..8041ec11bd48 100644
--- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
+++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
@@ -203,11 +203,6 @@ static int kirin_drm_kms_init(struct drm_device *dev,
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);
--
2.18.0
More information about the linux-arm-kernel
mailing list