Merge tag 'pci-v5.18-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / drivers / gpu / drm / armada / armada_drv.c
index 4f9b0a9f13e3dab057d8b02b8801dfeaf535c816..0643887800b4d33cea277876b604e44a18f76c5c 100644 (file)
@@ -177,17 +177,6 @@ static void armada_drm_unbind(struct device *dev)
        drm_mm_takedown(&priv->linear);
 }
 
-static int compare_of(struct device *dev, void *data)
-{
-       return dev->of_node == data;
-}
-
-static int compare_dev_name(struct device *dev, void *data)
-{
-       const char *name = data;
-       return !strcmp(dev_name(dev), name);
-}
-
 static void armada_add_endpoints(struct device *dev,
        struct component_match **match, struct device_node *dev_node)
 {
@@ -196,7 +185,7 @@ static void armada_add_endpoints(struct device *dev,
        for_each_endpoint_of_node(dev_node, ep) {
                remote = of_graph_get_remote_port_parent(ep);
                if (remote && of_device_is_available(remote))
-                       drm_of_component_match_add(dev, match, compare_of,
+                       drm_of_component_match_add(dev, match, component_compare_of,
                                                   remote);
                of_node_put(remote);
        }
@@ -213,7 +202,7 @@ static int armada_drm_probe(struct platform_device *pdev)
        struct device *dev = &pdev->dev;
        int ret;
 
-       ret = drm_of_component_probe(dev, compare_dev_name, &armada_master_ops);
+       ret = drm_of_component_probe(dev, component_compare_dev_name, &armada_master_ops);
        if (ret != -EINVAL)
                return ret;
 
@@ -223,7 +212,7 @@ static int armada_drm_probe(struct platform_device *pdev)
                int i;
 
                for (i = 0; devices[i]; i++)
-                       component_match_add(dev, &match, compare_dev_name,
+                       component_match_add(dev, &match, component_compare_dev_name,
                                            devices[i]);
 
                if (i == 0) {