lkml.org 
[lkml]   [2022]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] hwspinlock: Use device_match_of_node()
From


On 11/25/2022 3:44 PM, 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>

LGTM.
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>

> ---
> drivers/hwspinlock/hwspinlock_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c
> index fd5f5c5a5244..22b8f2a70b3b 100644
> --- a/drivers/hwspinlock/hwspinlock_core.c
> +++ b/drivers/hwspinlock/hwspinlock_core.c
> @@ -367,7 +367,7 @@ int of_hwspin_lock_get_id(struct device_node *np, int index)
> continue;
> }
>
> - if (hwlock->bank->dev->of_node == args.np) {
> + if (device_match_of_node(hwlock->bank->dev, args.np)) {
> ret = 0;
> break;
> }

\
 
 \ /
  Last update: 2022-11-25 09:19    [W:0.035 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site