diff options
-rw-r--r-- | Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml | 5 | ||||
-rw-r--r-- | drivers/hwspinlock/hwspinlock_core.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml b/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml index 10e5a53e447b..38478dad8b25 100644 --- a/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml +++ b/Documentation/devicetree/bindings/hwlock/allwinner,sun6i-a31-hwspinlock.yaml @@ -26,11 +26,15 @@ properties: resets: maxItems: 1 + '#hwlock-cells': + const: 1 + required: - compatible - reg - clocks - resets + - "#hwlock-cells" additionalProperties: false @@ -44,5 +48,6 @@ examples: reg = <0x01c18000 0x1000>; clocks = <&ccu CLK_BUS_SPINLOCK>; resets = <&ccu RST_BUS_SPINLOCK>; + #hwlock-cells = <1>; }; ... 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; } |