drm/komeda: Make use of the helper component_compare_of
authorYong Wu <yong.wu@mediatek.com>
Mon, 14 Feb 2022 06:07:58 +0000 (14:07 +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: "James (Qian) Wang" <james.qian.wang@arm.com>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mihail Atanassov <mihail.atanassov@arm.com>
Cc: Brian Starkey <brian.starkey@arm.com>
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Link: https://lore.kernel.org/r/20220214060819.7334-3-yong.wu@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/arm/display/komeda/komeda_drv.c

index e7933930a65770c3d63d9d72e90b86798f25a8b0..c325872699ecbb9a2af24bda1cbde76790220300 100644 (file)
@@ -92,11 +92,6 @@ static const struct component_master_ops komeda_master_ops = {
        .unbind = komeda_unbind,
 };
 
-static int compare_of(struct device *dev, void *data)
-{
-       return dev->of_node == data;
-}
-
 static void komeda_add_slave(struct device *master,
                             struct component_match **match,
                             struct device_node *np,
@@ -106,7 +101,7 @@ static void komeda_add_slave(struct device *master,
 
        remote = of_graph_get_remote_node(np, port, endpoint);
        if (remote) {
-               drm_of_component_match_add(master, match, compare_of, remote);
+               drm_of_component_match_add(master, match, component_compare_of, remote);
                of_node_put(remote);
        }
 }