Skip to content

Commit 07c3947

Browse files
sparkle-zteChun-Kuang Hu
authored andcommitted
drm/mediatek: Replace custom compare_dev with component_compare_of
Remove the custom device comparison function compare_dev and replace it with the existing kernel helper component_compare_of Signed-off-by: Tang Dongxing <[email protected]> Signed-off-by: Shao Mingyin <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/ Signed-off-by: Chun-Kuang Hu <[email protected]>
1 parent 94c9337 commit 07c3947

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -492,11 +492,6 @@ static const struct of_device_id mtk_ovl_adaptor_comp_dt_ids[] = {
492492
{ /* sentinel */ }
493493
};
494494

495-
static int compare_of(struct device *dev, void *data)
496-
{
497-
return dev->of_node == data;
498-
}
499-
500495
static int ovl_adaptor_of_get_ddp_comp_type(struct device_node *node,
501496
enum mtk_ovl_adaptor_comp_type *ctype)
502497
{
@@ -567,7 +562,7 @@ static int ovl_adaptor_comp_init(struct device *dev, struct component_match **ma
567562

568563
priv->ovl_adaptor_comp[id] = &comp_pdev->dev;
569564

570-
drm_of_component_match_add(dev, match, compare_of, node);
565+
drm_of_component_match_add(dev, match, component_compare_of, node);
571566
dev_dbg(dev, "Adding component match for %pOF\n", node);
572567
}
573568

0 commit comments

Comments
 (0)