Commit 947f019e authored by Yong Wu's avatar Yong Wu Committed by Greg Kroah-Hartman
Browse files

drm/vc4: Make use of the helper component_compare_dev



Use the common compare helper from component.

Cc: Emma Anholt <emma@anholt.net>
Cc: Maxime Ripard <mripard@kernel.org>
Signed-off-by: default avatarYong Wu <yong.wu@mediatek.com>
Link: https://lore.kernel.org/r/20220214060819.7334-18-yong.wu@mediatek.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 419838bc
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -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);