From: Yong Wu Date: Mon, 14 Feb 2022 06:08:09 +0000 (+0800) Subject: drm/rockchip: Make use of the helper component_compare_dev X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f798aa411fa6712eb885a8b5d138487736c55824;p=linux.git drm/rockchip: Make use of the helper component_compare_dev Use the common compare helper from component. Cc: Sandy Huang Cc: "Heiko St¨¹bner" Cc: linux-rockchip@lists.infradead.org Acked-by: Heiko Stuebner Signed-off-by: Yong Wu Link: https://lore.kernel.org/r/20220214060819.7334-14-yong.wu@mediatek.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index bec207de45440..3c2f2d6ecc36e 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c @@ -290,11 +290,6 @@ int rockchip_drm_endpoint_is_subdriver(struct device_node *ep) return false; } -static int compare_dev(struct device *dev, void *data) -{ - return dev == (struct device *)data; -} - static void rockchip_drm_match_remove(struct device *dev) { struct device_link *link; @@ -321,7 +316,7 @@ static struct component_match *rockchip_drm_match_add(struct device *dev) break; device_link_add(dev, d, DL_FLAG_STATELESS); - component_match_add(dev, &match, compare_dev, d); + component_match_add(dev, &match, component_compare_dev, d); } while (true); }