[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250403155419406T5YhIJKId1FWor70EWWHG@zte.com.cn>
Date: Thu, 3 Apr 2025 15:54:19 +0800 (CST)
From: <shao.mingyin@....com.cn>
To: <chunkuang.hu@...nel.org>
Cc: <p.zabel@...gutronix.de>, <airlied@...il.com>, <simona@...ll.ch>,
<matthias.bgg@...il.com>, <angelogioacchino.delregno@...labora.com>,
<dri-devel@...ts.freedesktop.org>,
<linux-mediatek@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <yang.yang29@....com.cn>,
<xu.xin16@....com.cn>, <ye.xingchen@....com.cn>,
<tang.dongxing@....com.cn>
Subject: [PATCH] drm/mediatek: Replace custom compare_dev with component_compare_of
From: Tang Dongxing <tang.dongxing@....com.cn>
Remove the custom device comparison function compare_dev and replace it
with the existing kernel helper component_compare_of
Signed-off-by: Tang Dongxing <tang.dongxing@....com.cn>
Signed-off-by: Shao Mingyin <shao.mingyin@....com.cn>
---
drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c
index fa0e95dd29a0..fe97bb97e004 100644
--- a/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c
+++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c
@@ -492,11 +492,6 @@ static const struct of_device_id mtk_ovl_adaptor_comp_dt_ids[] = {
{ /* sentinel */ }
};
-static int compare_of(struct device *dev, void *data)
-{
- return dev->of_node == data;
-}
-
static int ovl_adaptor_of_get_ddp_comp_type(struct device_node *node,
enum mtk_ovl_adaptor_comp_type *ctype)
{
@@ -567,7 +562,7 @@ static int ovl_adaptor_comp_init(struct device *dev, struct component_match **ma
priv->ovl_adaptor_comp[id] = &comp_pdev->dev;
- drm_of_component_match_add(dev, match, compare_of, node);
+ drm_of_component_match_add(dev, match, component_compare_of, node);
dev_dbg(dev, "Adding component match for %pOF\n", node);
}
--
2.25.1
Powered by blists - more mailing lists