提交 46a87c5a 编写于 作者: Y Yong Wu 提交者: Greg Kroah-Hartman

drm/meson: Make use of the helper component_compare_of

Use the common compare helper from component.

Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: linux-amlogic@lists.infradead.org
Signed-off-by: NYong Wu <yong.wu@mediatek.com>
Link: https://lore.kernel.org/r/20220214060819.7334-9-yong.wu@mediatek.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 05399aa0
...@@ -423,14 +423,6 @@ static int __maybe_unused meson_drv_pm_resume(struct device *dev) ...@@ -423,14 +423,6 @@ static int __maybe_unused meson_drv_pm_resume(struct device *dev)
return drm_mode_config_helper_resume(priv->drm); return drm_mode_config_helper_resume(priv->drm);
} }
static int compare_of(struct device *dev, void *data)
{
DRM_DEBUG_DRIVER("Comparing of node %pOF with %pOF\n",
dev->of_node, data);
return dev->of_node == data;
}
static void meson_drv_shutdown(struct platform_device *pdev) static void meson_drv_shutdown(struct platform_device *pdev)
{ {
struct meson_drm *priv = dev_get_drvdata(&pdev->dev); struct meson_drm *priv = dev_get_drvdata(&pdev->dev);
...@@ -473,7 +465,7 @@ static int meson_drv_probe(struct platform_device *pdev) ...@@ -473,7 +465,7 @@ static int meson_drv_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "parent %pOF remote match add %pOF parent %s\n", dev_dbg(&pdev->dev, "parent %pOF remote match add %pOF parent %s\n",
np, remote, dev_name(&pdev->dev)); np, remote, dev_name(&pdev->dev));
component_match_add(&pdev->dev, &match, compare_of, remote); component_match_add(&pdev->dev, &match, component_compare_of, remote);
of_node_put(remote); of_node_put(remote);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册