提交 11ef5c77 编写于 作者: Y Yong Wu 提交者: Greg Kroah-Hartman

drm/sprd: Make use of the helper component_compare_of

Use the common compare helper from component.

Cc: Orson Zhai <orsonzhai@gmail.com>
Cc: Baolin Wang <baolin.wang7@gmail.com>
Cc: Chunyan Zhang <zhang.lyra@gmail.com>
Cc: Kevin Tang <kevin3.tang@gmail.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime@cerno.tech>
Signed-off-by: NYong Wu <yong.wu@mediatek.com>
Link: https://lore.kernel.org/r/20220214060819.7334-11-yong.wu@mediatek.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 0a82e0a9
...@@ -134,14 +134,9 @@ static const struct component_master_ops drm_component_ops = { ...@@ -134,14 +134,9 @@ static const struct component_master_ops drm_component_ops = {
.unbind = sprd_drm_unbind, .unbind = sprd_drm_unbind,
}; };
static int compare_of(struct device *dev, void *data)
{
return dev->of_node == data;
}
static int sprd_drm_probe(struct platform_device *pdev) static int sprd_drm_probe(struct platform_device *pdev)
{ {
return drm_of_component_probe(&pdev->dev, compare_of, &drm_component_ops); return drm_of_component_probe(&pdev->dev, component_compare_of, &drm_component_ops);
} }
static int sprd_drm_remove(struct platform_device *pdev) static int sprd_drm_remove(struct platform_device *pdev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册