Skip to contentSkip to conversation

hwspinlock: Use device_match_of_node()

PATCH Applied [email protected] 4 participants 4 messages Nov 25, 2022 – Dec 28, 2022 Hardware spinlock core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwspinlock: Use device_match_of_node()

From: ye xingchen <[email protected]>

Replace the open-code with device_match_of_node().

---
 drivers/hwspinlock/hwspinlock_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwspinlock/hwspinlock_core.c +1 -1
index fd5f5c5a5244..22b8f2a70b3b 100644
@@ -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;
 		}
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · On 11/25/2022 3:44 PM, [email protected] wrote:

From: ye xingchen <[email protected]>

Replace the open-code with device_match_of_node().

LGTM.

Quoted 17 lines
---
  drivers/hwspinlock/hwspinlock_core.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwspinlock/hwspinlock_core.c +1 -1
index fd5f5c5a5244..22b8f2a70b3b 100644
@@ -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;
  		}