[PATCH 17/23] drm/vc4: Make use of the helper component_compare_dev
Yong Wu
yong.wu at mediatek.com
Sun Feb 13 22:08:13 PST 2022
Use the common compare helper from component.
Cc: Emma Anholt <emma at anholt.net>
Cc: Maxime Ripard <mripard at kernel.org>
Signed-off-by: Yong Wu <yong.wu at mediatek.com>
---
drivers/gpu/drm/vc4/vc4_drv.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index 16abc3a3d601..e0f4c2ef8ba6 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -187,11 +187,6 @@ static struct drm_driver vc4_drm_driver = {
.patchlevel = DRIVER_PATCHLEVEL,
};
-static int compare_dev(struct device *dev, void *data)
-{
- return dev == data;
-}
-
static void vc4_match_add_drivers(struct device *dev,
struct component_match **match,
struct platform_driver *const *drivers,
@@ -205,7 +200,7 @@ static void vc4_match_add_drivers(struct device *dev,
while ((d = platform_find_device_by_driver(p, drv))) {
put_device(p);
- component_match_add(dev, match, compare_dev, d);
+ component_match_add(dev, match, component_compare_dev, d);
p = d;
}
put_device(p);
--
2.18.0
More information about the Linux-mediatek
mailing list