lkml.org 
[lkml]   [2022]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH linux-next] drm/imx: Use device match of node()
From: ye xingchen <ye.xingchen@zte.com.cn>

Replace the open-code with device_match_of_node().

Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
drivers/gpu/drm/imx/imx-drm-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c
index e060fa6cbcb9..2e4f5af894b0 100644
--- a/drivers/gpu/drm/imx/imx-drm-core.c
+++ b/drivers/gpu/drm/imx/imx-drm-core.c
@@ -182,7 +182,7 @@ static int compare_of(struct device *dev, void *data)
if (strcmp(dev->driver->name, "imx-ipuv3-crtc") == 0) {
struct ipu_client_platformdata *pdata = dev->platform_data;

- return pdata->of_node == np;
+ return device_match_of_node(pdata, np);
}

/* Special case for LDB, one device for two channels */
@@ -191,7 +191,7 @@ static int compare_of(struct device *dev, void *data)
of_node_put(np);
}

- return dev->of_node == np;
+ return device_match_of_node(dev, np);
}

static int imx_drm_bind(struct device *dev)
--
2.25.1
\
 
 \ /
  Last update: 2022-11-17 08:12    [W:0.061 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site