Skip to contentSkip to conversation

remoteproc: core: Use device_match_of_node()

PATCH Applied [email protected] 2 participants 2 messages Nov 17, 2022 – Nov 21, 2022 Remote processor (remoteproc)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remoteproc: core: Use device_match_of_node()

From: ye xingchen <[email protected]>

Replace the open-code with device_match_of_node().

---
 drivers/remoteproc/remoteproc_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/remoteproc_core.c +1 -1
index cb1d414a2389..11c165ddf1fc 100644
@@ -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");
Signature · 1 line
2.25.1
maintainer Applied
#1 lore raw
Quoted 9 lines · On Thu, Nov 17, 2022 at 03:41:06PM +0800, [email protected] wrote:

From: ye xingchen <[email protected]>

Replace the open-code with device_match_of_node().

---
 drivers/remoteproc/remoteproc_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied.

Thanks,
Mathieu

Quoted 15 lines
drivers/remoteproc/remoteproc_core.c +1 -1
index cb1d414a2389..11c165ddf1fc 100644
@@ -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");
Signature · 1 line
2.25.1