hwspinlock: ignore disabled device

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

Acked-by: Suman Anna <[email protected]>
Signed-off-by: Fabien Dessenne <[email protected]>
Signed-off-by: Bjorn Andersson <[email protected]>
This commit is contained in:
Fabien Dessenne 2019-03-08 17:53:46 +01:00 • committed by Bjorn Andersson
commit fbd7330c9f

View file

@ -333,6 +333,11 @@ int of_hwspin_lock_get_id(struct device_node *np, int index)
if (ret)
return ret;
if (!of_device_is_available(args.np)) {
ret = -ENOENT;
goto out;
}
/* Find the hwspinlock device: we need its base_id */
ret = -EPROBE_DEFER;
rcu_read_lock();