[PATCH 02/23] drm/komeda: Make use of the helper component_compare_of

Yong Wu yong.wu at mediatek.com
Sun Feb 13 22:07:58 PST 2022


Use the common compare helper from component.

Cc: "James (Qian) Wang" <james.qian.wang at arm.com>
Cc: Liviu Dudau <liviu.dudau at arm.com>
Cc: Mihail Atanassov <mihail.atanassov at arm.com>
Cc: Brian Starkey <brian.starkey at arm.com>
Signed-off-by: Yong Wu <yong.wu at mediatek.com>
---
 drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
index e7933930a657..c325872699ec 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
@@ -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);
 	}
 }
-- 
2.18.0




More information about the linux-arm-kernel mailing list