Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/sprd: Make use of the helper component_compare_of

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>
Link: https://lore.kernel.org/r/20220214060819.7334-11-yong.wu@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Yong Wu and committed by
Greg Kroah-Hartman
11ef5c77 0a82e0a9

+1 -6
+1 -6
drivers/gpu/drm/sprd/sprd_drm.c
··· 134 134 .unbind = sprd_drm_unbind, 135 135 }; 136 136 137 - static int compare_of(struct device *dev, void *data) 138 - { 139 - return dev->of_node == data; 140 - } 141 - 142 137 static int sprd_drm_probe(struct platform_device *pdev) 143 138 { 144 - return drm_of_component_probe(&pdev->dev, compare_of, &drm_component_ops); 139 + return drm_of_component_probe(&pdev->dev, component_compare_of, &drm_component_ops); 145 140 } 146 141 147 142 static int sprd_drm_remove(struct platform_device *pdev)