hwspinlock: Use device_match_of_node()
authorye xingchen <ye.xingchen@zte.com.cn>
Fri, 25 Nov 2022 07:44:36 +0000 (15:44 +0800)
committerBjorn Andersson <andersson@kernel.org>
Wed, 28 Dec 2022 16:39:20 +0000 (10:39 -0600)
Replace the open-code with device_match_of_node().

Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/202211251544369078587@zte.com.cn
drivers/hwspinlock/hwspinlock_core.c

index fd5f5c5a5244d623e01cea6923339efdbfd8177f..22b8f2a70b3b8872f21b1fdf6584071a547575f3 100644 (file)
@@ -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;
                }