lkml.org 
[lkml]   [2022]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 10/23] drm/sprd: Make use of the helper component_compare_of
Date
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: Yong Wu <yong.wu@mediatek.com>
---
drivers/gpu/drm/sprd/sprd_drm.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/sprd/sprd_drm.c b/drivers/gpu/drm/sprd/sprd_drm.c
index a077e2d4d721..5d534a8db913 100644
--- a/drivers/gpu/drm/sprd/sprd_drm.c
+++ b/drivers/gpu/drm/sprd/sprd_drm.c
@@ -134,14 +134,9 @@ static const struct component_master_ops drm_component_ops = {
.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)
{
- 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)
--
2.18.0
\
 
 \ /
  Last update: 2022-02-14 07:11    [W:0.153 / U:3.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site