From: Yong Wu Date: Mon, 14 Feb 2022 06:08:06 +0000 (+0800) Subject: drm/sprd: Make use of the helper component_compare_of X-Git-Tag: v5.18-rc1~82^2~28 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=11ef5c77abc29d78ccedc26d01deb0bf0b2130f4;p=linux-block.git drm/sprd: Make use of the helper component_compare_of Use the common compare helper from component. Cc: Orson Zhai Cc: Baolin Wang Cc: Chunyan Zhang Cc: Kevin Tang Cc: Maarten Lankhorst Cc: Maxime Ripard Signed-off-by: Yong Wu Link: https://lore.kernel.org/r/20220214060819.7334-11-yong.wu@mediatek.com Signed-off-by: Greg Kroah-Hartman --- 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)