[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202211171541061366938@zte.com.cn>
Date: Thu, 17 Nov 2022 15:41:06 +0800 (CST)
From: <ye.xingchen@....com.cn>
To: <andersson@...nel.org>
Cc: <mathieu.poirier@...aro.org>, <linux-remoteproc@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH linux-next] remoteproc: core: Use device_match_of_node()
From: ye xingchen <ye.xingchen@....com.cn>
Replace the open-code with device_match_of_node().
Signed-off-by: ye xingchen <ye.xingchen@....com.cn>
---
drivers/remoteproc/remoteproc_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index cb1d414a2389..11c165ddf1fc 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -2112,7 +2112,7 @@ struct rproc *rproc_get_by_phandle(phandle phandle)
rcu_read_lock();
list_for_each_entry_rcu(r, &rproc_list, node) {
- if (r->dev.parent && r->dev.parent->of_node == np) {
+ if (r->dev.parent && device_match_of_node(r->dev.parent, np)) {
/* prevent underlying implementation from being removed */
if (!try_module_get(r->dev.parent->driver->owner)) {
dev_err(&r->dev, "can't get owner\n");
--
2.25.1
Powered by blists - more mailing lists