From: Yong Wu Date: Mon, 14 Feb 2022 06:08:12 +0000 (+0800) Subject: drm/omap: dss: Make use of the helper component_compare_dev X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=419838bcf74f8ecbddb5d3c2492dba86e4881636;p=linux.git drm/omap: dss: Make use of the helper component_compare_dev Use the common compare helper from component. Cc: Tomi Valkeinen Cc: Cai Huoqing Cc: Arnd Bergmann Cc: Laurent Pinchart Signed-off-by: Yong Wu Link: https://lore.kernel.org/r/20220214060819.7334-17-yong.wu@mediatek.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c index 69b3e15b93560..0399f3390a0ad 100644 --- a/drivers/gpu/drm/omapdrm/dss/dss.c +++ b/drivers/gpu/drm/omapdrm/dss/dss.c @@ -1344,12 +1344,6 @@ static const struct component_master_ops dss_component_ops = { .unbind = dss_unbind, }; -static int dss_component_compare(struct device *dev, void *data) -{ - struct device *child = data; - return dev == child; -} - struct dss_component_match_data { struct device *dev; struct component_match **match; @@ -1379,7 +1373,7 @@ static int dss_add_child_component(struct device *dev, void *data) return device_for_each_child(dev, cmatch, dss_add_child_component); - component_match_add(cmatch->dev, match, dss_component_compare, dev); + component_match_add(cmatch->dev, match, component_compare_dev, dev); return 0; }