Skip to contentSkip to conversation

hwspinlock: ignore disabled device

PATCH Superseded Fabien Dessenne 1 participant 1 message Mar 7, 2019 Hardware spinlock core

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwspinlock: ignore disabled device

Do not wait for hwspinlock device registration if it is not available for use.

---
 drivers/hwspinlock/hwspinlock_core.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/hwspinlock/hwspinlock_core.c +3 -0
index 2bad40d..8d63bdc 100644
@@ -333,6 +333,9 @@ int of_hwspin_lock_get_id(struct device_node *np, int index)
 	if (ret)
 		return ret;
 
+	if (!of_device_is_available(args.np))
+		return -ENOENT;
+
 	/* Find the hwspinlock device: we need its base_id */
 	ret = -EPROBE_DEFER;
 	rcu_read_lock();
Signature · 1 line
2.7.4