public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] remoteproc: core: Use device_match_of_node()
@ 2022-11-17  7:41 ye.xingchen
  2022-11-21 17:13 ` Mathieu Poirier
  0 siblings, 1 reply; 2+ messages in thread
From: ye.xingchen @ 2022-11-17  7:41 UTC (permalink / raw)
  To: andersson; +Cc: mathieu.poirier, linux-remoteproc, linux-kernel

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/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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH linux-next] remoteproc: core: Use device_match_of_node()
  2022-11-17  7:41 [PATCH linux-next] remoteproc: core: Use device_match_of_node() ye.xingchen
@ 2022-11-21 17:13 ` Mathieu Poirier
  0 siblings, 0 replies; 2+ messages in thread
From: Mathieu Poirier @ 2022-11-21 17:13 UTC (permalink / raw)
  To: ye.xingchen; +Cc: andersson, linux-remoteproc, linux-kernel

On Thu, Nov 17, 2022 at 03:41:06PM +0800, ye.xingchen@zte.com.cn wrote:
> 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/remoteproc/remoteproc_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Applied.

Thanks,
Mathieu

> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-21 17:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-17  7:41 [PATCH linux-next] remoteproc: core: Use device_match_of_node() ye.xingchen
2022-11-21 17:13 ` Mathieu Poirier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox