Re: [PATCH 06/23] drm/ingenic: Make use of the helper component_compare_of

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Le lun., févr. 14 2022 at 14:08:02 +0800, Yong Wu <yong.wu@xxxxxxxxxxxx> a écrit :
Use the common compare helper from component.

Cc: Paul Cercueil <paul@xxxxxxxxxxxxxxx>
Cc: linux-mips@xxxxxxxxxxxxxxx
Signed-off-by: Yong Wu <yong.wu@xxxxxxxxxxxx>

Acked-by: Paul Cercueil <paul@xxxxxxxxxxxxxxx>

Cheers,
-Paul

---
 drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
index b4943a56be09..23b8f012b418 100644
--- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
+++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
@@ -1322,11 +1322,6 @@ static int ingenic_drm_bind_with_components(struct device *dev)
 	return ingenic_drm_bind(dev, true);
 }

-static int compare_of(struct device *dev, void *data)
-{
-	return dev->of_node == data;
-}
-
 static void ingenic_drm_unbind(struct device *dev)
 {
 	struct ingenic_drm *priv = dev_get_drvdata(dev);
@@ -1360,7 +1355,7 @@ static int ingenic_drm_probe(struct platform_device *pdev)
 	if (!np)
 		return ingenic_drm_bind(dev, false);

-	drm_of_component_match_add(dev, &match, compare_of, np);
+	drm_of_component_match_add(dev, &match, component_compare_of, np);
 	of_node_put(np);

return component_master_add_with_match(dev, &ingenic_master_ops, match);
--
2.18.0







[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux