提交 6817222e 编写于 作者: Y Yong Wu 提交者: Greg Kroah-Hartman

drm/sun4i: Make use of the helper component_compare_of

Use the common compare helper from component.

Cc: Maxime Ripard <mripard@kernel.org>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Jernej Skrabec <jernej.skrabec@gmail.com>
Cc: linux-sunxi@lists.linux.dev
Signed-off-by: NYong Wu <yong.wu@mediatek.com>
Link: https://lore.kernel.org/r/20220214060819.7334-13-yong.wu@mediatek.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 50a912a8
...@@ -201,15 +201,6 @@ static bool sun4i_drv_node_is_tcon_top(struct device_node *node) ...@@ -201,15 +201,6 @@ static bool sun4i_drv_node_is_tcon_top(struct device_node *node)
!!of_match_node(sun8i_tcon_top_of_table, node); !!of_match_node(sun8i_tcon_top_of_table, node);
} }
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;
}
/* /*
* The encoder drivers use drm_of_find_possible_crtcs to get upstream * The encoder drivers use drm_of_find_possible_crtcs to get upstream
* crtcs from the device tree using of_graph. For the results to be * crtcs from the device tree using of_graph. For the results to be
...@@ -329,7 +320,7 @@ static int sun4i_drv_add_endpoints(struct device *dev, ...@@ -329,7 +320,7 @@ static int sun4i_drv_add_endpoints(struct device *dev,
of_device_is_available(node))) { of_device_is_available(node))) {
/* Add current component */ /* Add current component */
DRM_DEBUG_DRIVER("Adding component %pOF\n", node); DRM_DEBUG_DRIVER("Adding component %pOF\n", node);
drm_of_component_match_add(dev, match, compare_of, node); drm_of_component_match_add(dev, match, component_compare_of, node);
count++; count++;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册