aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYong Wu <[email protected]>2022-02-14 14:08:01 +0800
committerGreg Kroah-Hartman <[email protected]>2022-02-25 12:16:12 +0100
commit0904b83e0cbb3dc1b8d5c0b1a5daeca725600eee (patch)
tree948c753fefeb06c0e19356146ea1a56215520573
parent0a522394202f1f5ce1874b807c60dca3282b4c8c (diff)
drm/hirin: Make use of the helper component_compare_of
Use the common compare helper from component. Cc: Xinliang Liu <[email protected]> Cc: Tian Tao <[email protected]> Cc: John Stultz <[email protected]> Cc: Xinwei Kong <[email protected]> Cc: Chen Feng <[email protected]> Cc: Thomas Zimmermann <[email protected]> Cc: Laurent Pinchart <[email protected]> Cc: Hao Fang <[email protected]> Signed-off-by: Yong Wu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c7
1 files changed, 1 insertions, 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 @@ 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);