Use the common compare helper from component.

Cc: Neil Armstrong <narmstr...@baylibre.com>
Cc: Kevin Hilman <khil...@baylibre.com>
Cc: Jerome Brunet <jbru...@baylibre.com>
Cc: Martin Blumenstingl <martin.blumensti...@googlemail.com>
Cc: linux-amlo...@lists.infradead.org
Signed-off-by: Yong Wu <yong...@mediatek.com>
---
 drivers/gpu/drm/meson/meson_drv.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/meson/meson_drv.c 
b/drivers/gpu/drm/meson/meson_drv.c
index 80f1d439841a..3a9768a135bb 100644
--- a/drivers/gpu/drm/meson/meson_drv.c
+++ b/drivers/gpu/drm/meson/meson_drv.c
@@ -423,14 +423,6 @@ static int __maybe_unused meson_drv_pm_resume(struct 
device *dev)
        return drm_mode_config_helper_resume(priv->drm);
 }
 
-static int compare_of(struct device *dev, void *data)
-{
-       DRM_DEBUG_DRIVER("Comparing of node %pOF with %pOF\n",
-                        dev->of_node, data);
-
-       return dev->of_node == data;
-}
-
 static void meson_drv_shutdown(struct platform_device *pdev)
 {
        struct meson_drm *priv = dev_get_drvdata(&pdev->dev);
@@ -473,7 +465,7 @@ static int meson_drv_probe(struct platform_device *pdev)
                dev_dbg(&pdev->dev, "parent %pOF remote match add %pOF parent 
%s\n",
                        np, remote, dev_name(&pdev->dev));
 
-               component_match_add(&pdev->dev, &match, compare_of, remote);
+               component_match_add(&pdev->dev, &match, component_compare_of, 
remote);
 
                of_node_put(remote);
 
-- 
2.18.0

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to