[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250331173219124r-M-68bU1iEuljZXmBeS8@zte.com.cn>
Date: Mon, 31 Mar 2025 17:32:19 +0800 (CST)
From: <shao.mingyin@....com.cn>
To: <j@...nau.net>, <liviu.dudau@....com>, <chunkuang.hu@...nel.org>
Cc: <fnkl.kernel@...il.com>, <maarten.lankhorst@...ux.intel.com>,
<mripard@...nel.org>, <tzimmermann@...e.de>, <airlied@...il.com>,
<simona@...ll.ch>, <dri-devel@...ts.freedesktop.org>,
<asahi@...ts.linux.dev>, <linux-kernel@...r.kernel.org>,
<p.zabel@...gutronix.de>, <matthias.bgg@...il.com>,
<angelogioacchino.delregno@...labora.com>,
<linux-mediatek@...ts.infradead.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 4/4] 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_drm_drv.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
index 74158b9d6503..e1fbb0fe0597 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
@@ -627,11 +627,6 @@ static const struct drm_driver mtk_drm_driver = {
.minor = DRIVER_MINOR,
};
-static int compare_dev(struct device *dev, void *data)
-{
- return dev == (struct device *)data;
-}
-
static int mtk_drm_bind(struct device *dev)
{
struct mtk_drm_private *private = dev_get_drvdata(dev);
@@ -1119,7 +1114,7 @@ static int mtk_drm_probe(struct platform_device *pdev)
private->ddp_comp[DDP_COMPONENT_DRM_OVL_ADAPTOR].dev = &ovl_adaptor->dev;
mtk_ddp_comp_init(NULL, &private->ddp_comp[DDP_COMPONENT_DRM_OVL_ADAPTOR],
DDP_COMPONENT_DRM_OVL_ADAPTOR);
- component_match_add(dev, &match, compare_dev, &ovl_adaptor->dev);
+ component_match_add(dev, &match, component_compare_of, &ovl_adaptor->dev);
}
/* Iterate over sibling DISP function blocks */
--
2.25.1
Powered by blists - more mailing lists